『壹』 html自動彈窗代碼
觸發一個事件彈出兩個頁面吧, 加一段js代碼控制那個事件進行另外一個頁面的彈出
首先鏈接一個jquery庫
<script>
$("#id").click(function(){
$("a").href("http://www..com");
})
</script>
『貳』 HTML窗口彈出代碼
<!doctype html>
<html>
<head><title>無標題文檔</title></head>
<body>
<!--插入按鈕 開始-->
<input type="button" value="彈出對話框" onclick="MsgBox()" />
<!--插入按鈕 結束-->
<!--引用JS代碼以達到彈出對話框目的 開始-->
<script language="javascript">
function MsgBox() //聲明標識符
{
alert("我是對話框的內容"); //彈出對話框
}
</script>
<!--引用JS代碼以達到彈出對話框目的 結束-->
</body>
</html>

(2)彈窗公告頁html源碼擴展閱讀:
方法參數詳解
參數解釋:
window.open 彈出新窗口的命令;
'page.html' 彈出窗口的文件名;
'newwindow' 彈出窗口的名字(不是文件名),非必須,可用空''代替;
height=100 窗口高度;
width=400 窗口寬度;
top=0 窗口距離屏幕上方的象素值;
left=0 窗口距離屏幕左側的象素值;
toolbar=no 是否顯示工具欄,yes為顯示;
menubar,scrollbars 表示菜單欄和滾動欄。
resizable=no 是否允許改變窗口大小,yes為允許;
location=no 是否顯示地址欄,yes為允許;
status=no 是否顯示狀態欄內的信息(通常是文件已經打開),yes為允許;
『叄』 怎麼獲取彈出窗口的html代碼
用firefox 的birebug插件
源代碼一目了解,保證你試用了之後只剩下一個字:爽
『肆』 【簡單高分】求個最有效高彈出率的HTML彈窗廣告代碼,也可以在HTML中調用JS
<script language="javascript">
<!--
window.open ('page.html', 'newwindow', 'height=100, width=400,
top=0,left=0, toolbar=no, menubar=no, scrollbars=no,
resizable=no,location=no, status=no')
//寫成一行
-->
</script>
參數解釋:
<script language="javascript"> js腳本開始;
window.open 彈出新窗口的命令; '
page.html' 彈出窗口的文件名;
newwindow' 彈出窗口的名字(不是文件名),非必須,可用空''代替;
height=100 窗口高度; width=400 窗口寬度;
top=0 窗口距離屏幕上方的象素值;
left=0 窗口距離屏幕左側的象素值;
toolbar=no 是否顯示工具欄,yes為顯示;
menubar,scrollbars 表示菜單欄和滾動欄。
resizable=no 是否允許改變窗口大小,yes為允許;
location=no 是否顯示地址欄,yes為允許;
status=no 是否顯示狀態欄內的信息(通常是文件已經打開),yes為允許;
</script> js腳本結束
『伍』 html彈窗代碼
<html>
<head>
<script language="javascript">
function a(){
alert("he he");
}
</script>
</head>
<body onload="a();">
</body>
</html>
『陸』 求html彈出文本窗口代碼
<head>
<metacharset="utf-8">
<style>
body,div{margin:0;padding:0;border:0}
#div1{width:300px;height:200px;border:1pxsolidred;margin-left:50px}
</style>
</head>
<body>
<divid="div1">
div元素
<ahref=""target="_blank">打開一個新窗口</a>
</div>
<scripttype="text/javascript">
vardiv=document.getElementById("div1");
div.onclick=function(){
alert(div1.getElementsByTagName("a")[0].innerHTML);
}
</script>
</body>