[問題] 以登入的帳號當作網頁的資料夾?

看板Web_Design作者 (鳴啦啦! ^^)時間20年前 (2006/02/17 15:27), 編輯推噓4(402)
留言6則, 3人參與, 最新討論串1/1
我想請教一下,我要寫一個程式在網頁上 把密碼打進去後,會連到相對的資料夾上 例如:密碼aaaa,執行後,會跳到 http://xxx.com.tw/aaaa ^^^^ 密碼名稱 <script language="JavaScript"> <!-- function passWord() { var testV = 1; var pass1 = prompt('請輸入密碼!',' '); while (testV < 3) { if (!pass1) history.go(-1); if (pass1.toLowerCase() == "aaa") { alert('密碼正確!歡迎光臨'); window.open('http://xxx.com.tw/*[1;31m密碼/'); break; } testV+=1; var pass1 = prompt('密碼錯誤!!.','Password'); } if (pass1.toLowerCase()!="password" & testV ==3) history.go(-1); return " "; } --> </script> <center> <form> <input type="button" value="會員入口" onClick="passWord()"> </form> </center> window.open('http://xxx.com.tw/密碼/'); ^^^^ 密碼那要怎麼寫才會變成我輸入的資料啊?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 211.23.208.78

02/17 15:42, , 1F
先作字串相加,然後再丟進 open()
02/17 15:42, 1F

02/17 15:46, , 2F
字串相加??怎麼加啊~~
02/17 15:46, 2F

02/17 15:54, , 3F
02/17 15:54, 3F

02/17 16:01, , 4F
解決了~~~謝謝大家 ^^Y
02/17 16:01, 4F

02/17 16:17, , 5F
你寫的是 JavaScript,絕對不是 JAVA!!!!
02/17 16:17, 5F

02/17 16:42, , 6F
嗯嗯~~我知道我寫的是JavaScript
02/17 16:42, 6F
文章代碼(AID): #13zNhAKU (Web_Design)
文章代碼(AID): #13zNhAKU (Web_Design)