Re: [問題] 關於msgBox的問題
※ 引述《soc1971 (soc)》之銘言:
: 我有一段程式碼如下,我想改成有"是"和"否"的二個按鈕,請問要如何做
: msg = "確定要刪除嗎?"
: Response.write ("<" & "script language = VBScript>")
: Response.write ("MsgBox """ & msg """<" & "/script>")
: 以上在客戶端會顯示一個有"確定"的訊息窗
: 如果我想做一個有"確定"及"取消"的訊息窗,而且按後會分別前往不同的網頁
: 請問我的程式碼該如何撰寫
: 謝謝
不需要server端Response,都是在client跑的。
如下﹕
<script language="vbscript">
intMessage=msgbox("Please click yes or no",vbYesNo,"MsgTitle")
if intMessage = vbYes then
Msgbox("Your choice is Yes")
location.href="http://ptt.cc"
else
Msgbox("Your choice is No")
location.href="http://ppt.cc"
end if
'IE Only
</script>
--
隨便看看部落格
http://www.numino.net/blog/index.asp
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.91.213.122
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):