Why is code after [removed]() not executed?

前端 未结 8 384
长情又很酷
长情又很酷 2021-01-21 07:36

I have the follwing JavaScript.


    
        

        
8条回答
  •  清歌不尽
    2021-01-21 08:23

    document.write(content) writes content on the document stream.

    You have to close the stream after writing on the document in order to continue the page loading

    document.write("hello");
    document.close();
    
    • https://developer.mozilla.org/en-US/docs/DOM/document.write
    • https://developer.mozilla.org/en-US/docs/DOM/document.close
    • https://developer.mozilla.org/en-US/docs/DOM/document.open

提交回复
热议问题