jQuery中的单引号或双引号 [英] Single or Double quotes in jQuery
本文介绍了jQuery中的单引号或双引号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
何时在JavaScript中使用双引号或单引号
这是专门针对jQuery而不是JavaScript,因为我不是JavaScript程序员而且我开始学习jQuery。
This is specifically for jQuery not JavaScript in general since I'm not a JavaScript programmer and I'm starting to learn jQuery.
随着发布jQuery 1.6是否有使用单引号或双引号的特定更改?
With the release of jQuery 1.6 was there a specific change on using single or double quotes?
例如,以下函数是否可以在jQuery 1.6中运行?:
For example, would the following function work in jQuery 1.6?:
$('.selector').show();
或者我是否必须使用双引号?:
Or do I have to use double quotes?:
$(".selector").show();
提前感谢任何澄清。
推荐答案
字符串应始终使用双引号而不是单引号。
"Strings should always use double-quotes instead of single-quotes."
这篇关于jQuery中的单引号或双引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文