使用jquery从html页面中删除样式标签 [英] Using jquery remove style tag from html page
本文介绍了使用jquery从html页面中删除样式标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法从页面中使用jquery删除< style>
标签?
,我需要删除特定的样式标签。
谢谢。
解决方案 (); $ b $('style')。detach();
// $ b $($ document).ready(function(){
$ b $('style')。remove();
});
// $ b $($ document).ready(function(){
$ b $('style')。remove();
});
参考 。remove() 和 .detach( )
Is there any way to remove a <style>
tag from the page using jquery?
and i need to remove particular style tag.
Thanks.
解决方案
$(document).ready(function(){
$('style').detach();
// or
$('style').remove();
});
reference .remove() and .detach()
这篇关于使用jquery从html页面中删除样式标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文