打開某個網頁時,附加創建一個新窗口(如廣告,更新通知等)
<script language="JavaScript">
<!--
var whatsNew = open('','_blank','top=50,left=50,width=200,height=300,' +
??????????????? 'menubar=no,toolbar=no,directories=no,location=no,' +
??????????????? 'status=no,resizable=no,scrollbars=yes');
whatsNew.document.write('<center><b>更新通知</b></center>');
whatsNew.document.write('<p>最后更新日期:00.08.01');
whatsNew.document.write('<p>00.08.01:增加了“我的最愛”欄目。');
whatsNew.document.write('<p align="right">' +
??????????????? '<a href="javascript:self.close()">關閉窗口</a>');
whatsNew.document.close();
-->
</script>
當然也可以先寫好一個 HTML 文件,在 open() 方法中直接 load 這個文件。
posted on 2007-03-19 10:02 PeakGao 閱讀(310) 評論(0) 編輯 收藏 引用 所屬分類: Javascript