Javascript 文档
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8831130/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Javascript Documentation
提问by Acn
Is there something like JavaDocs for Javascript? When I press ctrl+space in netbeans IDE while
是否有类似于 JavaDocs for Javascript 的东西?当我在 netbeans IDE 中按 ctrl+space 时
writing javascript, the javascript documentation comes out for the object specified. But this documentation is I guess Netbeans' property.
在编写 javascript 时,javascript 文档会针对指定的对象出现。但我猜这个文档是 Netbeans 的财产。
If we write javascript in proper commented way, Netbeans builds docs for our custom javascript too.
如果我们以适当的注释方式编写 javascript,Netbeans 也会为我们的自定义 javascript 构建文档。
Can we find any such javascript documentation, outside Netbeans? So that we can refer to it?
我们能在 Netbeans 之外找到任何这样的 javascript 文档吗?这样我们就可以参考了?
Thanks for answer.
谢谢你的回答。
采纳答案by matsev
Have a look at the doc pages at Mozilla Developer Network (MDN) for a static reference:
查看 Mozilla Developer Network (MDN) 的文档页面以获取静态参考:
- https://developer.mozilla.org/en/JavaScript/Reference
- https://developer.mozilla.org/en/JavaScript/Guide
- https://developer.mozilla.org/en/JavaScript/Reference
- https://developer.mozilla.org/en/JavaScript/Guide
However, I am afraid that there is no tab-completion that can be used inside an IDE.
但是,恐怕没有可以在 IDE 中使用的制表符补全。
回答by lopsided98
In Google's source code of their homepage doodles, they use comments which look very similar to javadoc comments, so there must be some standard that at least Google uses.
在谷歌主页涂鸦的源代码中,他们使用的注释看起来与javadoc 注释非常相似,所以必须有一些至少谷歌使用的标准。
Here is an example:
下面是一个例子:
/**
* Configuration for a simulator speed setting.
* - stepTime: ms between simulation steps that do something.
* - emptyStepTime: ms between no-op steps.
* - tapeTime: ms for a tape operation.
* - branchTime: ms for a branch operation.
* @typedef {{stepTime: number, tapeTime: number, emptyStepTime: number,
* branchTime: number}}
* @private
*/
回答by Arne
Try an application called Ortelius. It uses some kind of javadoc like syntax to genrate documentation. ortelius.marten.dk
尝试一个名为 Ortelius 的应用程序。它使用某种类似 javadoc 的语法来生成文档。 奥特柳斯.marten.dk