今天網址列傳遞參數時,透過Request.QueryString轉回來時變成亂碼。參考該部落格的解法後做個小筆記避免自己忘記
- 如果是用JavaScript串網址的話,用encodeURI()這個方法 ```javascript
var Feature = ‘dialogWidth:500px;dialogHeight:200px;status:0;help:0;’;
var Url = ‘wFrmAccount_Insert.aspx?src=’ + src + ‘&bancode=’ + bancode + ‘&ym=’ + ym + ‘&type=’ + type;
//將網址先編譯過後再傳遞
window.showModalDialog(encodeURI(Url), window, Feature
1 |
|