亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

從不帶標簽的 Blogger 導入 JavaScript 文件

從不帶標簽的 Blogger 導入 JavaScript 文件

胡子哥哥 2023-06-15 16:37:14
我嘗試在不使用 <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>
查看完整描述

1 回答

?
哈士奇WWW

TA貢獻1799條經驗 獲得超6個贊

open() 方法打開一個輸出流以收集來自任何 document.write() 或 document.writeln() 方法的輸出。

執行完所有寫入后,document.close() 方法會導致顯示寫入輸出流的任何輸出。

Note: If a document already exists in the target, it will be cleared.

注意:不要將此方法與打開新瀏覽器窗口的 window.open() 方法混淆。


查看完整回答
反對 回復 2023-06-15
  • 1 回答
  • 0 關注
  • 138 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號