Javascript标准...... [英] Javascript standards...

查看:74
本文介绍了Javascript标准......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


有谁能告诉我在哪里可以找到像你这样的标准文件

c#。

我正在尝试编写javascript并想知道标准是什么

ie


在哪里放javascript函数即在Head中,身体或以下?


何时使用pascal套管即变量等..


任何帮助都会非常感激


谢谢


Ian

Hi there,

Can anybody tell me where I can find a standards documents like you have in
c#.

I am trying to write javascript and would like to know what standards are
i.e.

Where to put the javascript function i.e. in Head , Body or Below?

WHen to use pascal casing i.e. variables etc..

Any help would be really appreciated

Thanks

Ian

推荐答案

" Ian" < IA ********* @ hotmail.com>写道:
"Ian" <ia*********@hotmail.com> writes:
任何人都可以告诉我在哪里可以找到像你在c#中所拥有的标准文件。


ECMAScript:

< URL:http://www.mozilla.org/js/language/E262-3.pdf>


DOM:

< URL:http://www.w3.org/TR/DOM-Level-2-Core/>

< URL:http://www.w3.org/TR/DOM-Level-2-HTML/>

< URL:http://www.w3.org/ TR / DOM-Level-2-Events />

(还有一些)

我正在尝试编写javascript并想知道什么标准


在哪里放置javascript函数即头部,身体或下面?


HTML:

< URL:http://www.w3.org/TR/html4/>

(脚本元素可以放在头部内的大多数地方

或者身体元素,而不是其他地方。)

什么时候使用pascal套管即变量等。
Can anybody tell me where I can find a standards documents like you have in
c#.
ECMAScript:
<URL:http://www.mozilla.org/js/language/E262-3.pdf>

DOM:
<URL:http://www.w3.org/TR/DOM-Level-2-Core/>
<URL:http://www.w3.org/TR/DOM-Level-2-HTML/>
<URL:http://www.w3.org/TR/DOM-Level-2-Events/>
(there are a few more)
I am trying to write javascript and would like to know what standards are
i.e.

Where to put the javascript function i.e. in Head , Body or Below?
HTML:
<URL:http://www.w3.org/TR/html4/>
(Script elements can be placed in most places inside either the head
or body elements, and nowhere else).
WHen to use pascal casing i.e. variables etc..




ECMAScript区分大小写,但对使用的

案例没有限制。传统似乎暗示类似Java的外壳;


正常变量和函数:camelCase

构造函数:CapitalizedCamelCase

魔术常量: ALL_CAPITALS_AND_UNDERSCORES


示例:

---

var MAGIC_CONSTANT = 42;

function Foo( x){

this.x = x;

}

var foo = new Foo(MAGIC_CONSTANT);

alert(foo.x);

---


这个小组的常见问题解答是实际应用的良好开端
$ b所有这些标准和规范中的$ b:

< URL:http://jibbering.com/faq/>

同样是浏览器制造商的文档:


< URL:http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/>

<网址:http://www.mozilla.org/docs/dom/domref/>

< URL:http://msdn.microsoft.com/library/default.asp?url = /library/en-us/script56/html/js56jsoriJScript.asp>

< URL:http://msdn.microsoft.com/library/default.asp?url = / workshop / author / dhtml / dhtml_node_entry.asp>


Douglas Crockford在这里概述了这种语言:

< URL:http://www.crockford.com/javascript/survey.html>


祝你好运。

/ L

-

Lasse Reichstein Nielsen - lr*@hotpop.com

DHTML死亡颜色:< URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>

''没有判断的信仰只会降低精神神圣。''



ECMAScript is case sensitive, but there are no restrictions on the
cases used. Traditions seems to suggests Java-like casing;

normal variables and functions: camelCase
constructor functions: CapitalizedCamelCase
magic constants: ALL_CAPITALS_AND_UNDERSCORES

Example:
---
var MAGIC_CONSTANT = 42;
function Foo(x) {
this.x = x;
}
var foo = new Foo(MAGIC_CONSTANT);
alert(foo.x);
---

The FAQ for this group is a good start for the practical application
of all these standards and specifications:
<URL:http://jibbering.com/faq/>
Likewise are the browser manufacturers'' documentation:

<URL:http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/>
<URL:http://www.mozilla.org/docs/dom/domref/>
<URL:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jsoriJScript.asp>
<URL:http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/dhtml_node_entry.asp>

Douglas Crockford has an overview of the language here:
<URL:http://www.crockford.com/javascript/survey.html>

Good luck.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
''Faith without judgement merely degrades the spirit divine.''


2004年6月2日星期三21:31:45 +0000,Ian写道:
On Wed, 02 Jun 2004 21:31:45 +0000, Ian wrote:
你好,

任何人都可以告诉我在哪里可以找到像c#中那样的标准文件。
Hi there,

Can anybody tell me where I can find a standards documents like you have
in c#.




这是一个有趣的问题,考虑Micro



That''s a funny question considering Micro


oft拥抱和增强

javascript这就是为什么那里不止一个标准。


-

im

美国爱国者法案是最不爱国的法案美国历史。

oft "embraced and enhanced"
javascript which is why there is more than one "standard".

--
i.m.
The USA Patriot Act is the most unpatriotic act in American history.


这篇关于Javascript标准......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆