Unload files loaded with getScript?

后端 未结 5 1665
醉酒成梦
醉酒成梦 2020-12-10 06:57

With $.getScript I can load js files on the fly. Is it possible to \"unload\" some of these files ?

I have a ajax-based administrative panel. I have 3 sections. When

5条回答
  •  暖寄归人
    2020-12-10 07:39

    You can simply append and remove js files from head:

    $('script').last().remove();`//remove last file from html file
    $('head').append(''); //add js file 
    

提交回复
热议问题