最赞回答 / zlf520zy
在js中单双引号是一样的效果可以互换使用的,但是一个双引号(单引号)内部就不能再使用同种引号,防止错误的辨识引号的范围,如果非得用,就可以采用转义字符的方式。
2014-11-28
$(".red,.green").html("hi,我们的样子很美哦!");
2014-11-28
$("form *").attr("disabled", "true");
2014-11-28
$("li:last-child").css("background-color", "blue");
2014-11-28
$("li:first-child").css("background-color", "green");
2014-11-28
$("li[title*='果']").css("background-color", "green");
2014-11-28
$("li[title!='蔬菜']").css("background-color", "green");
2014-11-28