我是靠谱客的博主 大气长颈鹿,这篇文章主要介绍通过脚本清空标签p中的class名和style 原创,现在分享给大家,希望可以做个参考。

复制代码 代码如下:

<textarea name=jb51 cols=60 rows=6>  
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 0.05pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文本文本文本。</SPAN></p> 
</textarea><button onclick=alert(ubb(jb51.value))>alert</button>  
<script>  
function ubb(str)  
{  var strout;
    var re=/<p[\s\S]*?><span[\s\S]*?>(.*?)<\/span><\/p>/gi; 
    strout=str.replace(re,"<p>$1</p>");
return strout;
}  
</script>

最后

以上就是大气长颈鹿最近收集整理的关于通过脚本清空标签p中的class名和style 原创的全部内容,更多相关通过脚本清空标签p中的class名和style内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(132)

评论列表共有 0 条评论

立即
投稿
返回
顶部