simplest way to remove all the styles in a page

后端 未结 4 1545
礼貌的吻别
礼貌的吻别 2020-12-05 03:36

I need to remove all the style definitions in a page using javascript, to obtain the same result as doing View > Page Style > No Style in Firefox. Which i

4条回答
  •  甜味超标
    2020-12-05 04:04

    If you have jQuery, you can probably do something like

    $('link[rel="stylesheet"], style').remove();
    $('*').removeAttr('style');
    

提交回复
热议问题