index.html為:
<script>
window.onload = function () {
function open1() {
window.open('javascript:document.write("<iframe src=https://bbs.csdn.net/topics/d:/web/test.html(顯示)/test.html(不顯示) height=850 width=662></iframe>");document.close()', null, 'height=850,width=505,top=20,left=100, _blank, toolbar=no,menubar=no,location=no,status=no');
};
oBtn = document.querySelector('#open-btn01');
oBtn['onclick'] = function () {
open1();
};
};
</script>
<a href="" id="open-btn01" style="color:#000000;">test</a>
test.html為任意內容,比如<p>hello</p>也不顯示。
以上HTML和test.html在同一目錄(web)中。
請教各位大佬,小弟感激不盡!!
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/189856.html
標籤:JavaScript
上一篇:Javascript中模擬滑鼠點擊的方法是click(),那怎么模擬滑鼠右鍵點擊呢?
下一篇:egg ajax 請求
