我嘗試在不使用 <script src = 的情況下檢索博主提要代碼 我嘗試了 document.write 但是當(dāng)導(dǎo)入完成時(shí),原始頁(yè)面內(nèi)容被刪除 有沒(méi)有辦法在不使用 <script 的情況下按下按鈕時(shí)導(dǎo)入<button onclick="myFunction()">Click me</button><h1>Test Content</h1><script>function myFunction() {// The problem here is deleting the text content With document// And I tried Use document.createElement// Is there any other way to call and run the file codes ? document.open();document.write('<script type="text/javascript" src="https://photoshop4all.com/feeds/posts/default?max-results=5&alt=json-in-script&callback=URLAGAIN"><\/script>');document.close(); } function URLAGAIN(json) { document.write(json.feed.entry[0].link[1].href); }</script>
從不帶標(biāo)簽的 Blogger 導(dǎo)入 JavaScript 文件
胡子哥哥
2023-06-15 16:37:14