求一 js 方法 :<font style="color:red">new</font>保留new
求一 js 方法 :<font style="color:red">new</font>保留new
[解决办法]
var value="<font style=\"color:red\">new</font>";
value=value.replace(/<\/?font[^<>]*>/gi,"")
alert(value)
[解决办法]
- JScript code
var s = '<font style="color:red">new</font>'; var r = />([^<]+)</g; alert( r.exec(s)[1] )