站长资源网络编程

<meta>正则

整理:jimmy2024/10/29浏览2
简介复制代码 代码如下:var charResult = this.getAttribute("responseText").match(/\s]/i); charResult = charResult ? charResult[1]
复制代码 代码如下:
var charResult = this.getAttribute("responseText").match(/<meta.*?\Wcharset\s*=\s*(\S+?)["'>\s]/i);
charResult = charResult ? charResult[1] : "gb2312";