JQuery $(document).ready() and [removed]()

前端 未结 4 1538
甜味超标
甜味超标 2020-12-12 17:50

Firstly, is there a way to use document.write() inside of JQuery\'s $(document).ready() method? If there is, please clue me in because that will re

4条回答
  •  孤城傲影
    2020-12-12 18:18

    picardo's answer works, but this is more intuitive for me:

    $("body").append('\"Second');
    

    Also, for the script part that is being inserted with document.write(), check out jQuery's getScript() function

提交回复
热议问题