除去字符串中的html标签stripTags

去掉字符串中的html标签stripTags很多时候我们需要去掉字符串中的html标签?1、先看看prototype?1.6.0的写法

去掉字符串中的html标签stripTags

很多时候我们需要去掉字符串中的html标签

?

1、先看看prototype?1.6.0的写法:

?

?

/**stripTags -- 去掉目标字符串的html标签**@function**@param {String} source**@return {String} 去掉html标签的字符串**/ZYC.string.stripTags = function(source){    return String(source || '').replace(/<[^>]+>/g,'');};