js

kevn 2010-01-07 04:26:11
用windows.open弹出窗体后,再在已弹出的窗体的按钮事件下,再写windows.open再弹出一个窗体,如何控制第2个窗体的大小?第一个窗体我可以控制,第二个窗体大小不能改变,默认成了第一个的大小
...全文
158 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
lkz99999 2010-01-21
  • 打赏
  • 举报
回复
9楼说的对佩服
草根醉秋意 2010-01-11
  • 打赏
  • 举报
回复
window.open(url,name,features);

楼主你的open函数的第二个参数不要使用相同的名称,就是设置不一样name,也不要都为null,这样会打开两个窗口,如果名称相同的话第二个窗口就会把第一个窗口覆盖掉而不是打开一个新的窗口。
寒勿语 2010-01-11
  • 打赏
  • 举报
回复
等不急了结贴吧
寒勿语 2010-01-09
  • 打赏
  • 举报
回复
使用Showdialog尝试下看看
lkz99999 2010-01-07
  • 打赏
  • 举报
回复
第一个窗体没关闭,是在第一个基础上打开的第二个窗体
kevn 2010-01-07
  • 打赏
  • 举报
回复
第一个窗体代码
window.open('NewPension.aspx?e_name=" + Server.UrlEncode(e_name) + "&c_id=" + c_id + "&e_id=" + e_id + "&client_name=" + Server.UrlEncode(client_name) + "&client_id=" + client_id + "&bank_flag="+bank_flag+"&flag=0', null, 'width=600,height=500,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,left=450px,top=180px')";

第二个

Response.Write("<script> window.open('makeup.aspx?e_id=" + e_id + "&e_name=" + Server.UrlEncode(e_name) + "&client_id=" + client_id + "&client_name=" + Server.UrlEncode(client_name) + "&start_time=" + time + "&s_id=02&s_name=" + Server.UrlEncode("社保") + "&PenB=" + PenB + "&MedB=" + MedB + "&xy=" + DropDownList3.SelectedItem.Value + "&HeatingB=" + HeatingB + "', null, 'width=800px,height=500px,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,left=450px,top=180px')</script>");

这样不好使
kevn 2010-01-07
  • 打赏
  • 举报
回复
第一个窗体代码
window.open('NewPension.aspx?e_name=" + Server.UrlEncode(e_name) + "&c_id=" + c_id + "&e_id=" + e_id + "&client_name=" + Server.UrlEncode(client_name) + "&client_id=" + client_id + "&bank_flag="+bank_flag+"&flag=0', null, 'width=600,height=500,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,left=450px,top=180px')";

第二个

Response.Write("<script> window.open('makeup.aspx?e_id=" + e_id + "&e_name=" + Server.UrlEncode(e_name) + "&client_id=" + client_id + "&client_name=" + Server.UrlEncode(client_name) + "&start_time=" + time + "&s_id=02&s_name=" + Server.UrlEncode("社保") + "&PenB=" + PenB + "&MedB=" + MedB + "&xy=" + DropDownList3.SelectedItem.Value + "&HeatingB=" + HeatingB + "', null, 'width=800px,height=500px,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,left=450px,top=180px')</script>");

这样不好使
浪尖赏花 2010-01-07
  • 打赏
  • 举报
回复
可以指定的呀

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>index.htm</title>
<script>
function o(){
window.open("index.htm","","height="+document.getElementById("h").value+",width="+document.getElementById("w").value);
}
</script>
</head>

<body>
<input type=text id=w value="">
<input type=text id=h value="">
<input type=button value="open window" onclick="o()">
</body>

</html>
jol_boy 2010-01-07
  • 打赏
  • 举报
回复
第一个的窗口大小是你指定的,第二个窗体弹出时,窗体的width和height你没再次指定而是沿用第一个窗体的参数,自然不会改变。你可以重新指定!
寒勿语 2010-01-07
  • 打赏
  • 举报
回复
使用Showdialog尝试下看看

87,922

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧