判断是否存在中文和全角字符str.match(/[^\x00-\xff]/ig)判断包含中文字符串长度aMatch=str.match(/[^\x00-\x80]/g);str.length+(!aMatch?0:aMatch.length)...
http://www.jb51.net//article/15977.htm
[code]/* 2007-11-28 XuJian */ //截取字符串 包含中文处理 //(串,长度,增加...) function subString(str, len, hasDot) { var newLength = 0; var newStr = "";  ...
http://www.jb51.net//article/14210.htm
在xml应用中,经常将一些URL信息作为xml数据存储,其中URL参数有可能包含有中文字符。当使用dom对xml数据进行解析时,可以对中文字符进行编码。但如果只使用xslt来显示xml数据时(data.xml+data.xsl),发现此时的URL会出现编码错误.即使指定编码类型(encoding="gb2312"),依然会出现同样的问题.测试发现:是IE的缓存机制问题,IE仍会把新的页面(所链接的URL)的MIME内容类型默认为text/xml解决方法:1.指定输出文档类型为xml文档 (example:data.xsl) <xsl:outputmethod="xml...
http://www.jb51.net//article/2376.htm
共有:3/10,当前1/1页
[首页] [上一页]
1
[下一页] [尾页]
转到:
