encodeURIComponent, however, does encode these characters. Note that encodeURI by itself cannot form proper HTTP GET and POST requests, such as for XMLHTTPRequests, because "&", "+", and "=" are not encoded, which are treated as special characters in GET and POST requests. ! ~ * ' ( ) #ĮncodeURI differs from encodeURIComponent as follows: (See RFC2396)ĮncodeURI escapes all characters except: Not Escaped:Ī-Z a-z 0-9, / ? : & = + $ - _. Note how certain characters are used to signify special meaning: encodeURI does not encode characters that are necessary to formulate a complete URI. Also, encodeURI does not encode a few additional characters, known as "unreserved marks", which do not have a reserved purpose but are allowed in a URI "as is". The following example shows all the parts that a URI "scheme" can possibly contain. Descriptionĭoes not encode characters that have special meaning (reserved characters) for a URI. Return valueĪ new string representing the provided string encoded as a Uniform Resource Identifier (URI). Syntax encodeURI( URI) Parameters URI A complete Uniform Resource Identifier. If you'd like to contribute to the interactive examples project, please clone and send us a pull request. TypeError: invalid source for this interactive example is stored in a GitHub repository.TypeError: can't redefine non-configurable property "x".TypeError: can't delete non-configurable array element.TypeError: can't define property "x": "obj" is not extensible.TypeError: "x" is not a non-null object.Synta圎rror: unterminated string literal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |