阅读文章

几个不错的弹出窗口代码

[日期:2006-04-03] 来源:落伍者  作者: [字体: ]

用MYIE等多窗口浏览器进入后会弹出

是弹出一个新IE窗口来的,它的实现代码很简单

  
<script language="java script">
focusid=setTimeout("focus();window.showModelessDialog(tan.htm','','scroll:0;status:0;help:0;resizable:0;dialogWidth:0px;dialogHeight:0px')",0000)
</script>

然后在tan.htm这个页面放置这个代码:

  
<script language=java script>window.open('http://wangye8.com','114','resizable,menubar,scrollbars,dependent,location,toolbar,width=800,height=600');setTimeout('window.close();', 0);</script>



这样弹出的多页面窗口又自动关闭了,根本看不出来……

无边框对话框窗口可以在myie中弹出


   
<script Language="java script">
function 页面名称(WINwidth, WINheight) {
        showx = event.screenX - event.offsetX - 4 - WINwidth ; // + deltaX;
        showy = event.screenY - event.offsetY + 18; // + deltaY;

        newWINwidth = WINwidth + 4 + 18;
        var features =
                'dialogWidth:'  + newWINwidth  + 'px;' +
                'dialogHeight:' + WINheight + 'px;' +
                'dialogLeft:'   + showx     + 'px;' +
                'dialogTop:'    + showy     + 'px;' +
                'directories:no; localtion:no; menubar:no; status=no; toolbar=no;scrollbars:no;Resizeable=no';

        var endtarget = "弹出页面.htm";

//        window.open(endtarget, '', '');
        window.showModalDialog(endtarget, " ", features);
}
</script>

<input name="image" type=image onClick="页面名称(230, 35);return false;" src="../../代替按扭的图片.gif" alt="鼠标经过显示的文字" width="16" height="16" >


刚才看mop的
<script LANGUAGE="java script">

<!--

focusid=setTimeout("focus();window.showModelessDialog('http://xjtusky.net,'','scroll:0;status:0;help:0;resizable:0;dialogWidth:0px;dialogHeight:0px');window.focus();",3000)

//-->

</script>


阅读:
录入:blue1000

评论 】 【 推荐 】 【 打印
上一篇:动态提示的下拉框
下一篇:将HTML自动转为JS代码
相关文章      
本文评论
  sdq   (dw ,2008-04-29 )
发表评论


点评: 字数
姓名:

  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款