Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将removeChild从JavaScript重写为jQuery_Javascript_Jquery - Fatal编程技术网

如何将removeChild从JavaScript重写为jQuery

如何将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

我在页面的头部有这个JavaScript

<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();