怎样制作弹出窗口
19:20 | Author: Hui Li 李辉

1.在打开网页时弹出一个页面

在网页代码最后加入

<script>window.open("URL","a","width=420,height=330")</script>

"a" 每刷新页面,都会刷新窗口。

"" 每刷新页面,都会新增加一个弹出窗口。


2.点击超链接弹出一个窗口

<a style="cursor:hand" onclick='window.open("URL","","width=420,height=300")'>超链接描述文字</a>

toolbar 工具栏

menubar 菜单栏

scrollbars 滚动栏

resizebl 是否允许改变窗口大小

location 是否显示地址栏

status 是否显示状态栏

默认都是否, =1或yes 表示是


3.点击确认后弹出一个窗口或本地

javascript:if(confirm('每邀请。。。。\n\n请注意\n\n点击“确定”')){window.location='/friend/invite.php'}

This entry was posted on 19:20 and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

0 评论: