正则表达式,内容检查,请大家帮助!在线等候! var spstr=/<(^\>)*(mso|style|xml)(^\<)*>/gi;alert(spstr.test("<p>xml</p>"));alert(spstr.test("<xml>p</xml>")); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 写错了,应该是:var spstr=/\<[^>]*(mso|style|xml)[^>]*\>/gi;alert(spstr.test("<p>xml</p>"));alert(spstr.test("<xml>p</xml>")); 唉,又错,那两个反斜杠可以不要的:var spstr=/<[^>]*(mso|style|xml)[^>]*>/gi; to emu(ston):我是想要检查html标识的一些特定属性,标识内包括的内容没有限制,比如:<font color="red">文字stylexmlmso</font>可以<font style="color:red;">文字stylexmlmso</font>和<p class="mso">文字stylexmlmso</p>就不行。 tryvar spstr=/<(.*)(mso|style|xml)([^<]*)>/gi 谢谢大家!我的可以了,我用的var spstr=/<([^<]*)(mso|style|xml)([^<]*)>/gi; javascript 一个小问题。。 if (!c4csel.compare(frameWindow.document)) return true; 用JS写了个模仿FLASH的插件,在IE6,图片加载不到问题~~(在线等) 求助 Ext 拖动的 选项卡 (300分) 菜鸟问题 js面向对象this的问题 字符串的分割 共享一个DIV模态对话框,保证好用! 总是没有搞明白的问题 关于Js的getElementById(" ")无法的到对应对象的问题 关于字符串 这个该怎么实现?很简单的,来看一眼
alert(spstr.test("<p>xml</p>"));
alert(spstr.test("<xml>p</xml>"));
<font color="red">文字stylexmlmso</font>可以
<font style="color:red;">文字stylexmlmso</font>和<p class="mso">文字stylexmlmso</p>就不行。
var spstr=/<(.*)(mso|style|xml)([^<]*)>/gi
var spstr=/<([^<]*)(mso|style|xml)([^<]*)>/gi;