我嘗試在不使用 <script src = 的情況下檢索博主提要代碼 我嘗試了 document.write 但是當導入完成時,原始頁面內容被刪除 有沒有辦法在不使用 <script 的情況下按下按鈕時導入<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>
從不帶標簽的 Blogger 導入 JavaScript 文件
胡子哥哥
2023-06-15 16:37:14