JScript的“进口”语法ASP经典
我使用的是ASP“经典”的服务器,使用JavaScript作为语言引擎,由指令指定:JScript的“进口”语法ASP经典
<%@LANGUAGE='JAVASCRIPT'%>
我注意到,'进口”似乎成为关键字。
Technical Information (for support personnel)
* Error Type:
Microsoft JScript compilation (0x800A03F2)
Expected identifier
/Default.asp, line 4, column 4
var import = 'whut'
---^
如果使用了`import'关键字?
像大多数编程语言,某些关键字被保留。 Javascript有点特别,因为它保留了比在该语言中实现更多的关键字。导入就是其中的一个词。其他的例子是'private'和'void',尽管它们在当前版本中没有实现。
从here:
The import statement allows a script to import properties, functions and objects exported by a signed script. The following code imports the 'wine' and 'beer' properties of the object 'drinks' provided they have been made available by an exporting script (compare the export statement):
Code: i
mport drinks.beer, drinks.wine;
NOTE: Any exported script must be loaded into a window, frame or layer before it can be imported and used.
谢谢,安德鲁。我曾尝试使用这种语法与由出口,但它似乎仍然显示出语法错误: 错误类型: Microsoft JScript中的编译(0x800A03EA) 语法错误 /Default.asp,4种线 进口饮料。啤酒,drinks.wine; 我不希望这里出现语法错误。你怎么看? – 2009-04-10 19:44:41
导入是js中的保留字,但我认为它仅在JScript.NET和ActionScript中实际使用。
对JScript的保留字的完整列表(虽然很多都没有在语言中使用)是:
希望这有助于。
void实现,虽然不是真正有用的。 – KooiInc 2009-04-10 20:38:37