js去除html标签
2024-08-31 19:12:59
<script>
//替换掉所有的 html标签,得到html标签中的内容
var content = "<p><font color=#000000>没有标签了</font></p>"; var temp = content.replace(/<\/?.+?>/g, "");
var result = temp.replace(/ /g, "");//result为得到后的内容
alert(result);
</script>
最新文章
- Google Protocol Buffer开发环境搭建注意事项
- C#----XML操作小结
- (转载)Apache下error.log文件太大的处理
- Spring AOP使用整理:自动代理以及AOP命令空间
- 【mysql】MySQL存储IP地址
- linux挂载详解
- Python学习(2)
- java开发中的23中设计模式
- Makefile与shell脚本区别
- HDU2159 研发费用背包
- nova创建虚拟机源码分析系列之三 PasteDeploy
- 带吸附效果的ViewPager(一)
- python全栈开发 * 10知识点汇总 * 180612
- 安装Visual Studio 2013以及简单使用
- 2018.10.31 vijos1052贾老二算算术(高斯消元)
- 高通Audio中ASOC的machine驱动(一)
- luogu2679 [NOIp2015]子串 (dp)
- [Codeforces Gym] 100162B Circle of Stones
- smtpclient 邮件发送测试
- 一个好玩的CTF题
热门文章
- MySQL索引结构之Hash索引、full-text全文索引(面)
- com.aliyun.oss.ClientException: Connection error due to: Connection pool shut down
- JVM中的常量池详解
- JWT(JSON Web Token)入门
- [原题复现+审计][SUCTF 2019] WEB CheckIn(上传绕过、.user.ini)
- ci爬坑
- tomcat安装证书https
- ABBYY FineReader 15新增编辑页面布局功能
- Sonar检测Math.abs(new Random().nextInt()) “Use the original value instead”
- Thread.start() ,它是怎么让线程启动的呢?