5D艺术网首页
商城
|
资讯
|
作品
|
博客
|
教程
|
论坛
登录
注册
加为好友
发短消息
来自:
性别:秘密
最后登录:2009-04-30
http://kvla.5d.cn/
首页
|
新闻
|
话题
|
博客
|
相册
|
艺术作品
|
社交关系
|
留言板
|
社交圈
2006/01/04 | 开新窗口的js
类别(代码)
|
评论
(0)
|
阅读(370)
|
发表于 15:18
<script language=javascript src="opennew.js"></script>
function opennew(newurl,windowName,width,height)
{
var theLeft,theTop
theLeft=(screen.width-width)/2-2
theTop=(screen.height-height)/2
window.open
(newurl,windowName,'width='+width+',height='+height+',scrollbars=no,status=0,toolbar=0,resizable=0,left='+theLeft+',top='+the
Top+'').focus();
//return true;
}
function opennewfull(newurl,windowName)
{window.open(newurl,windowName,'width='+screen.width+',height='+(screen.height-55)
+',scrollbars=0,toolbar=0,resizable=0,left=0,top=0').focus();
}
function openModal(newUrl,windowName,width,height,controlName){
controlName.value=showModalDialog(newUrl,windowName,"dialogWidth:"+width+";dialogHeight:"+height+";center:1")
}
<a href="#" onClick="opennew('http://www.kvla.net','1013',830,666)">不要点我哦!</a>
<a href="#" onClick="opennew('http://www.flashempire.net','1',103,600)">别点啦,没用的!</a>
0
评论
Comments
日志分类
首页
[46]
动画
[2]
相册
[1]
代码
[3]
网页
[0]
图画
[34]
日记
[6]