encodeURIComponent("http://?+-*/!@#$%^&王\\ ")
encodeURI("http://?+-*/!@#$%^&王\\ ")
http%3A%2F%2F%3F%2B-*%2F!%40%23%24%25%5E%26%E7%8E%8B%5C%20
http://?+-*/!@#$%25%5E&%E7%8E%8B%5C%20
encodeURIComponent 編碼所有url不能使用字符,不能直接編碼整個url,否則&/?等都會被轉碼 (不編碼 -*!)
encodeURI 編碼除url字符以外的非字符數字的 ,可直接編碼url完整地址,不會改變url性質,但url的參數不能有特殊字符或已經被編碼。(不編碼 +-*/: ?!#@$)
decodeURI decodeURIComponent