用__doPostBack(eventTarget, eventArgument)提交防止重复提交
来源:互联网 发布:浙江网络发票真伪查询 编辑:程序博客网 时间:2024/06/03 16:16
表达能力有限, 只供代码,自己体会
文件 Past.js
function CheckBox()
{
if(confirm('充值手机:['+document.MobileCommit.TextBox1.value+'] 充值金额:[ '+document.MobileCommit.TextBox2.value+' ] 元 确认充值!')==false)
return false;
MobileCommit.Button1.disabled=true; //禁止button1
MobileCommit.Button2.disabled=true;
__doPostBack('Button1',''); // 用__doPostBack提交
}
在页面文件Mobile.aspx 里加一个
<script src="js/Past.js" language="javascript"></script>
接下来是 Mobile.cs
private void Page_Load(object sender, System.EventArgs e)
{
this.GetPostBackEventReference(this.Button1);
Button1.Attributes.Add("onclick", "return CheckBox()");
}
你们可以照此方法测试
文件 Past.js
function CheckBox()
{
if(confirm('充值手机:['+document.MobileCommit.TextBox1.value+'] 充值金额:[ '+document.MobileCommit.TextBox2.value+' ] 元 确认充值!')==false)
return false;
MobileCommit.Button1.disabled=true; //禁止button1
MobileCommit.Button2.disabled=true;
__doPostBack('Button1',''); // 用__doPostBack提交
}
在页面文件Mobile.aspx 里加一个
<script src="js/Past.js" language="javascript"></script>
接下来是 Mobile.cs
private void Page_Load(object sender, System.EventArgs e)
{
this.GetPostBackEventReference(this.Button1);
Button1.Attributes.Add("onclick", "return CheckBox()");
}
你们可以照此方法测试
- 用__doPostBack(eventTarget, eventArgument)提交防止重复提交
- 用__doPostBack(eventTarget, eventArgument)提交防止重复提交
- 表单提交防止重复提交
- 防止重复提交数据
- 防止重复提交
- struts防止重复提交
- 防止表单重复提交
- 防止重复提交
- 防止重复提交表单
- javascript 防止重复提交
- Struts防止重复提交
- 防止struts重复提交
- 防止重复提交
- javascript 防止重复提交
- Struts2 防止重复提交
- 防止重复提交
- 防止servlet重复提交
- 防止重复提交
- sprintf你知道多少
- 数据库中数据挖掘的基本技术介绍
- 视频网站热浪消退 垂直门户成新焦点
- 贞子真的可怕么^_^
- 虚拟机上安装R3 46C
- 用__doPostBack(eventTarget, eventArgument)提交防止重复提交
- 了解OLE及ActiveX
- [推荐]富人和穷人的12个经典差异
- Javascript useful custom function
- 电脑怎么定时关机和开机
- Get gdb call stack
- DbUnit使用入门
- 如何成为Java高手
- 我和你的千里之外