现在的位置: 首页 > 综合 > 正文

lt;metagt;正则

2012年03月16日 ⁄ 综合 ⁄ 共 150字 ⁄ 字号 评论关闭

复制代码 代码如下:
var charResult = this.getAttribute("responseText").match(/<meta.*?\Wcharset\s*=\s*(\S+?)["'>\s]/i);
charResult = charResult ? charResult[1] : "gb2312";

抱歉!评论已关闭.