我正在使用window.location.href.
如果我不切换&到&在字符串中加入 URL 参数,IE7 和 IE8 就会报错(例如,®变成了注册商标符号)。
如果我只写&as &,我的现代 Firefox 24.0 不会处理参数,因为它只是将它们读取为 straight &。
如何以使两个浏览器都满意的方式对 URL 进行编码?encodeURIComponent()只是打破了每个人的整个事情。
window.location.href = '/ex/mypage.php?MemberID=' + memberID + '®=reg&rid=' + return_data + '&YearRegisteringFor=' + regYear;