如何更改警报消息 [英] How to change alert Message

查看:82
本文介绍了如何更改警报消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表单,当用户点击提交按钮时会显示警告消息。如何更改确定和取消按钮以表示是和否?另外,我从浏览器中得到错误,表示必须重新发送信息。为什么我得到这个?



I have a form that will display an alert message when the user clicks on the submit button. How can i change the "OK and Cancel" buttons to say Yes and No? Plus I get the error from my browser that says it will have to resend the information. Why Am I getting this?

Page.ClientScript.RegisterStartupScript(this.GetType(), "Alert", "if(confirm('You Have Successfully Submitted the Cohort! If you have Additional Cohorts Please Click Cancel to Enter another Cohort.') == true){ location.reload();}else{location.href='Gradrate.aspx';}", true);

推荐答案

请参阅以下链接: -

创建您自己的确认框,如: - http://jsfiddle.net/Xtreu/ [ ^ ]



并询问重发请参考: -

http://stackoverflow.com/questions/6661175/how-can-i-refresh-a-webpage-without-the-browser-asking-if-i-want-to-resend-again [ ^ ]
refer below links:-
Create your own confirm box like:-http://jsfiddle.net/Xtreu/[^]

and for asking about resend refer this:-
http://stackoverflow.com/questions/6661175/how-can-i-refresh-a-webpage-without-the-browser-asking-if-i-want-to-resend-again[^]


这篇关于如何更改警报消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆