function changeToUnicode(str){
var Fstr = "";
var s = "";
if(str == "" || str == undefined){
texa.value = "no String!";
return ;
}
for(i = 0 ;i < str.length ; i++){
Fstr = str.charAt(i);
s += "" + String.fromCharCode(92) + String.fromCharCode(117) + Fstr.charCodeAt().toString(16);
}
// texa.value = s;
}
是不是这种效果,转成unicode
var Fstr = "";
var s = "";
if(str == "" || str == undefined){
texa.value = "no String!";
return ;
}
for(i = 0 ;i < str.length ; i++){
Fstr = str.charAt(i);
s += "" + String.fromCharCode(92) + String.fromCharCode(117) + Fstr.charCodeAt().toString(16);
}
// texa.value = s;
}
是不是这种效果,转成unicode
就是要charAt函数~~~~~