如何将removeChild从JavaScript重写为jQuery
我在页面的头部有这个JavaScript如何将removeChild从JavaScript重写为jQuery,javascript,jquery,Javascript,Jquery,我在页面的头部有这个JavaScript <script type="text/javascript"> var nojscss = document.getElementById('nojscss'); nojscss.parentNode.removeChild(nojscss); </script> var nojscss=document.getElementById('nojscss'); nojscss.parentNode.removeC
<script type="text/javascript">
var nojscss = document.getElementById('nojscss');
nojscss.parentNode.removeChild(nojscss);
</script>
var nojscss=document.getElementById('nojscss');
nojscss.parentNode.removeChild(nojscss);
我想在jQuery中重写它,以便在加载页面时运行
我对jQuery很陌生,你知道怎么做吗?
<script type="text/javascript">
$('#nojscss').remove();
</script>
$('#nojscss')。删除();
试试这个:
<script type="text/javascript">
$("#nojscss").remove();
</script>
$(“#nojscss”).remove();