单击确认框中的确定按钮,如何重定向到特定的网页。请帮助我知道 [英] on clicking ok button in confirm box,how to redirect to a particular webpage.please help me know
本文介绍了单击确认框中的确定按钮,如何重定向到特定的网页。请帮助我知道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我点击网页中的提交按钮时,我保持确认框有确定并取消按钮当我点击确定按钮时它应该重定向到网页(home.aspx),当我点击取消按钮时它应该重定向到(索引) .aspx)..如何为它编码...请帮助我....提前感谢
when i click submit button in a webpage,i have kept a confirm box having ok and cancel buttons when i click ok button it should redirect to webpage(home.aspx) and when i click cancel button it should redirect to (index.aspx)..how to code for it..help me please....thanks in advance
推荐答案
您可以直接在Javascript确认对话框中处理此问题。
这是一个例子 -
You can handle this directly in the Javascript confirmation dialog.
Here is an example -
if (confirm(''Message'')) {
window.location = "ConfirmPage.aspx";
}
这篇关于单击确认框中的确定按钮,如何重定向到特定的网页。请帮助我知道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文