大家知道js去掉html标签吗?下面我们就给大家详细介绍一下吧!我们积累了一些经验,在此拿出来与大家分享下,请大家互相指正。
<script type="text/javascript">
window.onload = function () {
var attr = document.getElementById("attr");
attr.setAttribute("style", "font-weight:bold;")
alert(attr.getAttribute("style"));
}
</script>
相信大家已经学会js去掉html标签了吧!感谢大家对我们网站的支持!
相关推荐:
js过滤html标签技巧介绍