作者tomin (藍藍紫黃橘 粉灰白綠咖)
看板Web_Design
標題Re: [問題] 網址搬家
時間Wed Dec 8 20:35:54 2010
※ 引述《banband (smooth jazz)》之銘言:
: 大家好
: 在此想請教與法的問題
: 我有一個 a.xxx.tw 的網站
: 我想要讓別人進來這個網站後
: 他會跳出一個警告視窗
: 按確定之後
: 就會跳到
: b.xxx.tw
: 請問這個要怎麼寫呢 大感嗯
if(window.confirm('go to b.xxx.tw?'))
location.href='
http://www.google.com';
Demo
http://www.jsfiddle.net/a2gwt/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.122.30.198
推 banband:謝謝您 12/08 21:14
推 cassatte:一定要跳的話要用alert..confirm的話會有是跟否 12/12 03:50