摘要:
传说中的Mozilla推荐/* mozilla.org Base Styles* maintained by fantasai*//* Suggested order:* display* list-style* position* float* clear* width* height* margin* padding* border* background* color* font* text... 阅读全文
摘要:
/** * 得到字符串的字符长度(一个汉字占两个字符长) */ function getBytesLength(str) { // 在GBK编码里,除了ASCII字符,其它都占两个字符宽 return str.replace(/[^x00-xff]/g, 'xx').length; } /** * 根据字符长来截取字符串 */ function subStringByBytes(val, max... 阅读全文