有没有办法实现在按提交按钮后,弹出一个提示信息,在弹出提示信息的同时也提交◎◎◎◎ 有没有办法实现在按提交按钮后,弹出一个提示信息(页面或对话框...都可以),在弹出提示信息的同时也提交? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <style>.msg{ border:1px solid #888; background:#f7f7f7; width:300px; heght:50px; line-height:50px; position:absolute; z-index:99; text-align:center;}</style><script type="text/javascript">function showMsg(msg){ var div = document.getElementById("divMsg"); if(div==null){ div = document.createElement("div"); div.className="msg"; document.body.appendChild(div); } div.innerHTML=msg; div.style.left=document.body.clientWidth/2-150; div.style.top=document.body.clientHeight/2-25;}</script><form onsubmit="showMsg('正在加载数据...');" action="http://mail.163.com"><input type="submit" value="submit"></form> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head><body><form id="form1" name="form1" method="post" action="http://www.google.com"> <p> 用户名: <input type="text" name="textfield" /></p> <p> 密码: <input type="text" name="textfield2" /></p> <p> <label> <input type="button" name="Submit" value="提交吧" onclick="document.all.form1.submit();alert('感谢您提交的申请,我们稍后会进行处理。');"/> </label> </p></form></body></html>-----------看看这样行不行? 同意xiao7cn(烧鸡)把button的onclick写在一个函数里,第一行写myform.submit();然后写弹出<script type="text/javascript"> function formsubmit(){ myform.submit(); alert("感谢您的提交!"); }</script><form name="myform"> <input type="button" value="提交" onclick="formsubmit()"></form> js eventClientX client.Width client.Height offsetWidth offsetHeight属性属于哪个? 关于图片翻页 不影响整个网页 这里为什么是undefined? 带有警告的测试 诡异的问题 在线等待~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 高手来救命啊~~ 访问我原来网站的时候如何同时打开我的新站? 【高手请进入】利用JavaScript实现动态改变表格列宽 js 前端框架选用? javascript提交图片表单 除了<iframe>,还有其它的网页嵌套的标签吗?
.msg{
border:1px solid #888;
background:#f7f7f7;
width:300px;
heght:50px;
line-height:50px;
position:absolute;
z-index:99;
text-align:center;
}
</style>
<script type="text/javascript">function showMsg(msg){
var div = document.getElementById("divMsg");
if(div==null){
div = document.createElement("div");
div.className="msg";
document.body.appendChild(div);
}
div.innerHTML=msg;
div.style.left=document.body.clientWidth/2-150;
div.style.top=document.body.clientHeight/2-25;
}
</script><form onsubmit="showMsg('正在加载数据...');" action="http://mail.163.com">
<input type="submit" value="submit">
</form>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<form id="form1" name="form1" method="post" action="http://www.google.com">
<p>
用户名:
<input type="text" name="textfield" />
</p>
<p>
密码:
<input type="text" name="textfield2" />
</p>
<p>
<label>
<input type="button" name="Submit" value="提交吧" onclick="document.all.form1.submit();alert('感谢您提交的申请,我们稍后会进行处理。');"/>
</label>
</p>
</form>
</body>
</html>-----------
看看这样行不行?
把button的onclick写在一个函数里,第一行写myform.submit();然后写弹出
<script type="text/javascript">
function formsubmit(){
myform.submit();
alert("感谢您的提交!");
}
</script><form name="myform">
<input type="button" value="提交" onclick="formsubmit()">
</form>