日期:2014-05-16 浏览次数:20321 次
function duibi(s1, s2) { var arr1 = s1.split("|"); var arr2 = s2.split("|"); var right = 0; var error = 0; var total = arr2.length; for (var i = 0; i < 3; i++) { if (arr1[i].length == arr2[i].length) { right++; } else { error++; } } alert("恭喜你!!!此次得分为:" +right * 1+ "分"+"(总共 40 题)"); }
function duibi(s1, s2) { var arr1 = s1.split("|"); var arr2 = s2.split("|"); var right = 0; var error = 0; var total = arr2.length; for (var i = 0; i < 3; i++) { if (arr1[i] === arr2[i]) { right++; } else { error++; } } alert("恭喜你!!!此次得分为:" +right * 1+ "分"+"(总共 40 题)"); }