是否有 Javascript 信息的中央存储库?
例如,如果您想了解 PHP 函数的信息,您可以访问 http://www.php.net/。如果您想了解 Perl 函数的信息,可以访问 http://www.cpan.org/ 和/或使用 perldoc。如果您想了解有关 Java 的信息,可以访问 http://java.sun.com 和/或使用 javadoc 。但是,如果您想要有关 Javascript 方法/函数及其属性、返回值等的信息,您该去哪里?我问的原因是我正在使用“focus()”方法,想知道它是否可以传递任何值,或者在调用时是否返回任何内容。我粗略地进行了谷歌搜索,但没有发现太多。这样的野兽存在还是我运气不好?
For example, if you want information of PHP functions, you can go to http://www.php.net/ . If you want information of Perl functions you can to to http://www.cpan.org/ and/or use perldoc. If you want information on Java you can go to http://java.sun.com and/or use javadoc. However, if you want information on Javascript methods/functions and their attributes, return values, etc. where do you go? The reason I ask is I was playing with the "focus()" method and wondering if it could be passed any values or if it returned anything when called. I have done a cursory Google search but haven't found much. Does such a beast exist or am I out of luck?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
没有真正的一站式服务,因为针对不同浏览器有不同的 ECMAScript 实现。
重要资源:
W3Schools 有一半不错的跨浏览器参考资料,为提醒我@Dalin 欢呼。根据我的经验,他们的东西对于基础知识来说是好的和可靠的(不过,@bobince 不同意,并指出了他们的示例中的安全漏洞。所以要小心。)在复杂的参考问题上,他们经常无法正确指出跨浏览器问题,您最终会在 MDC 和 MSDN 上查找更深入的信息。不过,值得注意的是,这是一个有用的来源。
ECMAScript 本身 - 这是基本语言“ JavaScript 背后没有特定于浏览器的部分,例如使其成为“现实世界语言”的文档对象模型。为链接@Bobince 干杯。
另请参阅此问题 关于参考站点和材料。
There is no real one-stop shop, because there are various implementations of ECMAScript specific to the various browsers.
Important resources:
W3Schools has half-decent cross-browser reference material, cheers for reminding me @Dalin. In my experience, their stuff is okay and reliable for the basics (@bobince disagrees, though, and points out security holes in their examples. So be careful.) on complex reference questions, they often fail to properly point out cross browser issues, and you end up looking on MDC and MSDN to find deeper information. Still, worth noting and a useful source.
ECMAScript itself - this is the basic language "behind" JavaScript without the browser-specific parts like the Document Object Model that make it a "real world language". Cheers for the link @Bobince.
See also this question on reference sites and materials.
就我个人而言,我喜欢使用 gotapi.com - 我的所有文档都集中在一个地方:-)
Personally I like to use gotapi.com - all of my documentation in one place :-)
您正在寻找的网站将是 EMAScript.org,但正如 Pekka 指出的那样,它不是与其他语言文档网站一样有用,因为许多浏览器偏离了规范。
我发现 DevGuru Javascript 索引页面 是一个很棒的 Web 资源编程,因为它非常容易阅读,您可以快速找到您要查找的内容。
The site you are looking for would be the EMAScript.org, however as Pekka indicated it is not as helpful as other language documentation sites since many browser deviate from the specifications.
I find the DevGuru Javascript Index page is a great resource for doing web programming, as it is very easy to read and you can quickly find what you are looking for.