我寫這行的在我的項目代碼..我怎樣才能在客戶端頁面)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。