Re: [問題] 關於msgBox的問題

看板Web_Design作者 (神聖光芒)時間13年前 (2011/05/12 15:08), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《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
文章代碼(AID): #1DouTPjr (Web_Design)
文章代碼(AID): #1DouTPjr (Web_Design)