有谁知道一个好的正则表达式来从html中删除事件。
例如,字符串: "<h1 onmouseover="top.location='http://www.google.com">Large Text</h1> Befores "<h1>Large Text</h1> So保留了HTML标签,但删除了onmouseover,onmouseout,onclick等事件。
"<h1 onmouseover="top.location='http://www.google.com">Large Text</h1>
"<h1>Large Text</h1>
提前致谢!
javascript regex events
events ×1
javascript ×1
regex ×1