The problem code is described as follows:
function Filter_str (str) {
var res= "";
for (Var i=0;i
var c=str.charcodeat (i);
if (c>32 && c!=127 && c!=39) {
Res + = str[i].tostring (); Errors are reported in IE7 or IE7 for kernel browsing
}
}
return res;
}
Know what the rules are, cause?
Reply to discussion (solution)
IE (JScript) adheres to early JavaScript conventions
So the string cannot be manipulated as an array.
Str[i].tostring ()
Should write
Str.charat (i)
IE (JScript) adheres to early JavaScript conventions
So the string cannot be manipulated as an array.
Str[i].tostring ()
Should write
Str.charat (i)
Learn the ...
What is the difference between the early JavaScript conventions and the current JS? From where, can you find the relevant documents?
Thank you.
I didn't say it (and I don't know). Look at this, it might help, http://baike.baidu.com/link?url=vKSyRkaROAwAyfcFmmbmx-RyfZ2fG4_. Jv07bormkcu5qrpi26ypdtj8cos8xpx3d63skpbaajkpbpyoz2qr_gk
In view of the differences in JavaScript support for each browser, it is recommended to use the JQuery framework. So you don't have to worry about compatibility.