Home  >  Article  >  Web Front-end  >  The difference between jquery single quotes and double quotes and their usage notes_jquery

The difference between jquery single quotes and double quotes and their usage notes_jquery

WBOY
WBOYOriginal
2016-05-16 17:27:301311browse

Executable syntax: $("ul li a").filter(":contains('Canon'),:contains('Panasonic'),:contains('Casio')").css("color"," red");

Incorrect syntax: $("ul li a").filter(":contains("Canon"),:contains("Panasonic"),:contains("Casio")" ).css("color","red");

According to the data, single quotes and double quotes are the same in js, but I encountered problems when using them, so Baidu gave me the answer , it is said that when using it in daily life, try to use single quotation marks. Only when nesting is encountered, two quotation marks will be used at the same time. That is, when there are single quotes outside, double quotes must be used inside, and when there are double quotes outside, single quotes must be used inside. In short, double quotes or single quotes cannot be used at the same time;

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