求问,哪里出问题了?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb18030">
<title>Untitled Document</title>
</head>
<body>
<script type="text/javascript">
/*
* param1 Array
* param2 Array
* return true or false
*/
function arraysSimilar(arr1, arr2){
if(arr1 instanceof Array&& arr2 instanceof Array){
if(arr1.length==arr2.length){
a1=arr1.sort();
a2=arr2.sort();
for(i=0,i<arr1.length,i++){
if(Object.prototype.toString.apply(a1[i]) == Object.prototype.toString.apply(a2[i])){
return true;
}
}
}else{
return false;
}
}else{
return false;
}
}
</script>
<script src="testData.js"></script>
</body>
</html>