js 用windows.open弹出窗体后,再在已弹出的窗体的按钮事件下,再写windows.open再弹出一个窗体,如何控制第2个窗体的大小?第一个窗体我可以控制,第二个窗体大小不能改变,默认成了第一个的大小 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 第一个的窗口大小是你指定的,第二个窗体弹出时,窗体的width和height你没再次指定而是沿用第一个窗体的参数,自然不会改变。你可以重新指定! 可以指定的呀<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> 第一个窗体代码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>");这样不好使 第一个窗体代码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>");这样不好使 window.open(url,name,features);楼主你的open函数的第二个参数不要使用相同的名称,就是设置不一样name,也不要都为null,这样会打开两个窗口,如果名称相同的话第二个窗口就会把第一个窗口覆盖掉而不是打开一个新的窗口。 求指教。。。 xhEditor上传回调json字串怎么处理?调用? 求助,Extjs 分页不准确 请教如何做网站-语言-工具-流程-后台 Jquery - FlexiGrid 的相关问题 reload和refresh的联系与区别 如何在网上实现闹钟程序? 网页的在线交流-在页面中打开MSN对话窗口和在线用户交流,老大怎么做?HELP 如何禁用IE的刷新操作? IE中的小问题 JavaScript调用SVG 随机生成iframe 求子页面获取iframe的ID
<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>
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>");这样不好使
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>");这样不好使