如何在jQuery中发表评论

如何在jQuery中使用注释 ,使用自动化插件您的意见和不用其他floading意见有效地使用它们有效地发表意见。

基本jQuery的意见

jQuery的意见,发起了告诉解释就行了下面的文字是不是要处理,如JavaScript双斜杠。 jQuery的评论可以是一个函数内部或外部没有区别。

 function myFunction ( myVar, myVar2 ) {
// Pay attention to spaces around
// the brackets and curly brackets
} 
 // some prefere it like this
function myFunction()
{
...
} 

多行jQuery的意见

Multi-line jQuery comments are enclosed within a combination of a forward slash and an asterisk like so:

/* comment */

jQuery Commenting Guidelines

Here are a couple of pointers for commenting in jQuery:

  1. Long comments should use /* ... */.
  2. Single line comments should always be on their own line and be
    above the line they reference. Additionally there should be an
    extra endline above it. For example:
var some = "stuff";

   // We're going to loop here
   for ( var i = 0; i < 10; i++ ) {}
[/js]

Source: http://docs.jquery.com/JQuery_Core_Style_Guidelines

From: https://www.sitepoint.com//comments-jquery/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值