<meta>正则

(编辑:jimmy 日期: 2024/9/23 浏览:2)

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