Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
The encodeURI() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences fo
Encoding a lone surrogate throws
A URIError will be thrown if one attempts to encode a surrogate which is not part of a high-low pair. For example:
String.prototype.toWellFormed()
A URIError will be thrown if one attempts to encode a surrogate which is not part of a high-low pair. For example:
String.prototype.isWellFormed()
A URIError will be thrown if one attempts to encode a surrogate which is not part of a high-low pair. For example:
The more recent RFC3986 makes square brackets reserved (for IPv6) and thus not encoded when forming something which could be part of a URL (such as a host). It also reserves !, ', (, ), and *, even though these character
This page was last modified on Sep 2, 2026 by MDN contributors.