Home > Web Front-end > JS Tutorial > 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
Release: 2016-05-16 17:27:30
Original
1351 people have browsed it

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;

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template