但不匹配 <script type ="text/html"> 的正则表达式-6ren"> 但不匹配 <script type ="text/html"> 的正则表达式-当前代码(不工作): /^script\s*type=\"text\/javascript/i.test(tagName) 最佳答案 //i 关于javascript - 匹配 <script -6ren">
gpt4 book ai didi

javascript - 匹配 <script type ="text/javascript"> 但不匹配 <script type ="text/html"> 的正则表达式

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:27:17 25 4
gpt4 key购买 nike

当前代码(不工作):

/^script\s*type=\"text\/javascript/i.test(tagName)

最佳答案

/<script\stype\=\"text\/javascript\">/i

关于javascript - 匹配 &lt;script type ="text/javascript"> 但不匹配 &lt;script type ="text/html"> 的正则表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11075999/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com