看到這兩行代碼,還是感覺很新鮮。一般情況下都是採用html的方式書寫頁面結構。現在採用js寫入html,喜歡的小夥伴,點贊哈。麼麼噠
代碼實例
document.write("<h1>This is a heading</h1>");
document.write("<p>This is a paragraph</p>");
看到這兩行代碼,還是感覺很新鮮。一般情況下都是採用html的方式書寫頁面結構。現在採用js寫入html,喜歡的小夥伴,點贊哈。麼麼噠
document.write("<h1>This is a heading</h1>");
document.write("<p>This is a paragraph</p>");
(function(d, s, id) { let js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) retur