摘要:
js截取方式1、区别汉字和英文代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--functionwidthCheck(name,maxLength){if(!maxLength){maxLength=20;}if(name==null||name.length1){return["",""];}varw=0;//字符串长度,一个汉字长度为2vars=0;//汉字个数varp=false;//判断字符串当前循环的前一个字符是否为汉字varb=fa 阅读全文
posted @ 2010-02-24 17:14 Eric Chan 阅读(296) 评论(0) 推荐(0) 编辑