function ShowResult() { var n = [ '4' ]; var m = [ '1,3,4', '1,2,4,5,6', '3', '2' ]; p=(100*n/m).toString()+'%'; alert(p); }