0
當我想重定向時,變量其中總是未定義。但是,例如,我想把這個變量放在alert();
它顯示正確的數字。javascript變量始終未定義
代碼
var where = msg.txt;
window.location = "/page.php?id=".where; //this redirects to /page.php?id=undefined
alert(where); //it show correct number