How to get a Script Tag's innerHTML

前端 未结 5 1776
梦如初夏
梦如初夏 2021-01-19 20:02

Alright... I\'ve been searching for an hour now... How does one get the innerHTML of a script tag? Here is what I\'ve been working on...



        
5条回答
  •  一生所求
    2021-01-19 20:23

    I'm guessing you want one of two things:

    1. To make a JavaScript file global (so that other pages can call it)

    2. To get the script that is currently in the file

    Both of those can be solved by moving your script to a .js file, and then using the tag

    
    

提交回复
热议问题