您的位置: 首页 > IT文章 > <meta>正则 <meta>正则 分类: IT文章 • 2022-07-29 17:09:39 复制代码 代码如下: var charResult = this.getAttribute("responseText").match(/<meta.*?\Wcharset\s*=\s*(\S+?)["'>\s]/i); charResult = charResult ? charResult[1] : "gb2312";