数据分析师2017-10-01 00:21:54
What is the difference between using jquery single quotes and double quotes? -PHP Chinese website Q&A-What is the difference between using jquery single quotes and double quotes? -PHP Chinese website Q&A
Let’s take a look and learn.
伊谢尔伦2017-02-17 10:37:44
可以执行的语法:
$("ul li a").filter(":contains('佳能'),:contains('松下'),:contains('卡西欧')").css("color","red");
错误的语法:
$("ul li a").filter(":contains("佳能"),:contains("松下"),:contains("卡西欧")").css("color","red");
据资料显示在js中单引号和双引号都是一样的,但是在使用是去碰到了问题,于是乎百度给我答案,说是平时使用的时候尽量用单引号,只有碰到嵌套的时候才会同时用两种引号。即外面是单引号的时候里面就要用双引号,外面是双引号的时候里面就要用单引号,总之不能同时用双引号或者是单引号。