紧急呼救:求弹出式窗口代码 那是用div层来做的吧。我常用的方法的是:点击后 把一个层显示出来 这个层的z-index属性设置的大一点 ,再规定一下它的长宽和 position属性 就行了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 51job那只是一个DIV层。不是窗体级的。就像楼上所说,设个DIV,用absolute定位,Z-index设一个大点的值就OK了。 //自制弹出对话框1.主页面 <form name="form1" action=""> <input type="text" name="username"> <input type="button" name="submitForm" value="提交" onclick="submitForm1();"></form><script> function submitForm1(){ var result=window.showModalDialog("myconfirm.html", 2,"dialogWidth:240px;dialogHeight:120px;status:no;"); if(result==1){ check(document.getElementsByName("form1")[0]); } } function check(frm){ var username=document.getElementsByName("username")[0]; var result; if(username.value==""){ result=window.showModalDialog("myconfirm.html", new Array(1,"请输入用户名"),"dialogWidth:240px;dialogHeight:120px;status:no;"); return; } frm.submit(); }</script>2.提示页面myconfirm.html <title> 系统提示</title><body onload="init();"><div id="content" align="center" valign="middle">init</div></body><script>var args=window.dialogArguments;var number=2;var show="<br>";if(args){ if(args.length>0){ number=args[0]; } if(args.length>1){ show=args[1]+"<br>"; }}var str="<input type=\"button\" value=\"确 定\" onclick=\"closeWindow(1);\">";if(number==2){ str+=" <input type=\"button\" value=\"取 消\" onclick=\"closeWindow(2);\">";}function init(){ var div=document.getElementById("content"); div.innerHTML=show+str;}window.returnValue=2;function closeWindow(num){ window.returnValue=num; window.close();}</script> http://blog.csdn.net/lip009/archive/2007/10/19/1833720.aspx模拟51job选择地点做的 http://blog.csdn.net/lip009/archive/2007/10/19/1833720.aspx 模拟51job选择地点做的 这段代码的意思以及我应该怎么做? 关于javascript的回车换行问题 求两个日期中的每一天 referer 为什么跳转为空请大侠们帮帮忙 有没有什么函数做完一件事后可以让程序休息个30秒的啊? 请问高手,这个问题怎么解决。 请教一个麻烦的问题 怎样避免弹出这样的对话框? 我是javascript菜鸟 技术区 用正则表达式验证输入的用户名只能由字母,数字,下划线组成,求一个完整的例子50分 在js中获得cookies然后提交到asp的问题
1.主页面
<form name="form1" action="">
<input type="text" name="username">
<input type="button" name="submitForm" value="提交" onclick="submitForm1();">
</form>
<script>
function submitForm1(){
var result=window.showModalDialog("myconfirm.html",
2,"dialogWidth:240px;dialogHeight:120px;status:no;");
if(result==1){
check(document.getElementsByName("form1")[0]);
}
}
function check(frm){
var username=document.getElementsByName("username")[0];
var result; if(username.value==""){
result=window.showModalDialog("myconfirm.html",
new Array(1,"请输入用户名"),"dialogWidth:240px;dialogHeight:120px;status:no;");
return;
}
frm.submit();
}
</script>2.提示页面myconfirm.html <title>
系统提示
</title>
<body onload="init();">
<div id="content" align="center" valign="middle">
init
</div>
</body>
<script>
var args=window.dialogArguments;
var number=2;
var show="<br>";if(args){
if(args.length>0){
number=args[0];
}
if(args.length>1){
show=args[1]+"<br>";
}
}var str="<input type=\"button\" value=\"确 定\" onclick=\"closeWindow(1);\">";
if(number==2){
str+=" <input type=\"button\" value=\"取 消\" onclick=\"closeWindow(2);\">";
}
function init(){
var div=document.getElementById("content");
div.innerHTML=show+str;
}
window.returnValue=2;
function closeWindow(num){
window.returnValue=num;
window.close();
}
</script>
模拟51job选择地点做的
模拟51job选择地点做的