?JavaScript?,????decodeURI()???decodeURIComponent()?????????URI????
- ??decodeURI()??????URI:
var encodedURI = "https://www.example.com/中文网站"; var decodedURI = decodeURI(encodedURI); console.log(decodedURI); // ??:https://www.example.com/????
- ??decodeURIComponent()???????URI??:
var encodedComponent = "中文网站"; var decodedComponent = decodeURIComponent(encodedComponent); console.log(decodedComponent); // ??:????
??:???URI????,?????????????,??????????????????