Home  >  Article  >  Web Front-end  >  Example of JQuery escaping special characters in ID_jquery

Example of JQuery escaping special characters in ID_jquery

WBOY
WBOYOriginal
2016-05-16 17:23:241123browse

Sometimes when processing HTML, for the convenience of combining with PHP, the id here in the array a[] will be used, or the id contains other special characters such as /@ etc.

In order to use jquery to obtain the element, it needs to be escaped. Special characters

go directly to the example

Copy code The code is as follows:

< ;div id="a[]">kkkkkk



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:A brief analysis of the difference between the prop() method and attr() method in jquery_Basic knowledgeNext article:A brief analysis of the difference between the prop() method and attr() method in jquery_Basic knowledge

Related articles

See more