showx = event.screenX - event.offsetX ; // 横向的位置;
showy = event.screenY - event.offsetY ; // 纵向的位置;
window.open("a.asp",'','left='+showx+',top='+showy)
showx 、showy 需要进行一点调整
showy = event.screenY - event.offsetY ; // 纵向的位置;
window.open("a.asp",'','left='+showx+',top='+showy)
showx 、showy 需要进行一点调整
解决方案 »
- json_parse.js 谁用过? 教教我
- 如何用Javascipt索引Json树
- 求一正则表达式
- 再求教个javascript的问题
- 可能是最难的JS问题了~~~~~希望有人听说过!完全没有思路不知道该怎么做
- 变量读取html内容
- 请教一个出错信息的解决办法?
- 为什么用window.open打开的窗口,再用window.opener.document.forms[0].submit回去,其中参数传不成功
- JS返回上一级页面, 显示用户名
- $.datepicker is undefined 这是怎么回事儿呢?
- javascript与数据压缩
- window.prompt上只能显示一个文本框吗?
top= ( document.body.clientHeight - 弹出的窗口高)/2
left= ( document.body.clientWidth -弹出的窗口宽)/2
<!--var a = window.open("about:blank","","menubar=no;toolbar=no;")a.moveTo((screen.width-a.document.body.clientWidth)/2,(screen.height-a.document.body.clientHeight)/2);//-->
</script>
left= ( document.body.clientWidth -弹出的窗口宽)/2
function OpenWindow(url,winname,width,height)
{
var sw=screen.width;
var sh=screen.height;
var sl=parseInt((sw-width)/2);
var lt=parseInt((sh-height)/2);
window.open(url,winname,'width='+width.toString()+',height='+height.toString()+',left='+sl.toString()+',top='+lt.toString()+',toolbar=no,menubar=no,scrollbars=no,status=no');
}