Script tags with src and code between script tags

前端 未结 4 1768
执念已碎
执念已碎 2020-12-06 19:16

Is the following valid javascript? Would the variable be available to the externally called script?



        
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-06 19:35

    No its not, if you refer to a source the code between the script tags is ignored. You could do it like this:

    
    
    

提交回复
热议问题