找到字符串中的上标给重新赋值,做个标记
function ToSBC(txtstring)
{
var text = $("#" + txtstring + "").val();
var tmp = text;
for (var i = 0; i < text.length; i++) {
if (!/^[\x00-\xff]*$/.test(text.charAt(i))) {
if (text.charAt(i) == "\u00b3") {
text.charAt(i) = "\u00b3";
}
tmp = "";
if (text.charCodeAt(i) == 32) {
tmp = tmp + String.fromCharCode(12288);
}
if (text.charCodeAt(i) < 127 ) {
tmp = tmp + String.fromCharCode(text.charCodeAt(i) + 65248);
}
}
}
$("#" + txtstring + "").textbox("setValue", tmp);
}
这样写的话报错,函数不能有返回值,求助!!!