我写这行的在我的项目代码..我怎样才能在客户端页面)OK按钮消息框的响应
ClientScript.RegisterStartupScript(this.GetType(“我的警报”,“警报(” “+ mystringvariable +”');“,true);
Response.Redirect(“Home.aspx”);
,并在其中发生了什么,它直接跳出来主页没有弹出一个消息.. 怎么能按下OK按钮,那么它应该主页上重定向后弹出一个消息......
PLS尽快帮我。
我写这行的在我的项目代码..我怎样才能在客户端页面)OK按钮消息框的响应
ClientScript.RegisterStartupScript(this.GetType(“我的警报”,“警报(” “+ mystringvariable +”');“,true);
Response.Redirect(“Home.aspx”);
,并在其中发生了什么,它直接跳出来主页没有弹出一个消息.. 怎么能按下OK按钮,那么它应该主页上重定向后弹出一个消息......
PLS尽快帮我。
你还是用JS确认,OK按钮让JS重定向如:
<html>
<head>
<script type="text/javascript">
function confirmation() {
var answer = confirm("Question?")
if (answer){
//your home.aspx
window.location = "http://www.google.com/";
}
}
</script>
</head>
<body>
<form>
<input type="button" onclick="confirmation()" value="OK">
</form>
</body>
</html>
应该到哪里进入ClientScript.RegisterStartupScript。