應(yīng)用總結(jié):asp編程心得 ------外文翻譯.doc
約9頁(yè)DOC格式手機(jī)打開(kāi)展開(kāi)
應(yīng)用總結(jié):asp編程心得 ------外文翻譯,一、數(shù)據(jù)共享 在某些情形下混合運(yùn)用vbscript和jscript函數(shù)是非常有用的,但在不同語(yǔ)言腳本之間共享數(shù)據(jù)也可能很有用。實(shí)現(xiàn)這種共享的方法很簡(jiǎn)單:不管使用的是什么語(yǔ)言,只要是在頁(yè)面級(jí)聲明的變量就可以任意引用。 對(duì)象的使用方法也相似,可以任意選用合適的語(yǔ)言讀取、修改屬性或調(diào)用對(duì)象的方法。當(dāng)然給定對(duì)象的屬性和...
內(nèi)容介紹
此文檔由會(huì)員 wanli1988go 發(fā)布
一、數(shù)據(jù)共享
在某些情形下混合運(yùn)用VBScript和JScript函數(shù)是非常有用的,但在不同語(yǔ)言腳本之間共享數(shù)據(jù)也可能很有用。實(shí)現(xiàn)這種共享的方法很簡(jiǎn)單:不管使用的是什么語(yǔ)言,只要是在頁(yè)面級(jí)聲明的變量就可以任意引用。
對(duì)象的使用方法也相似,可以任意選用合適的語(yǔ)言讀取、修改屬性或調(diào)用對(duì)象的方法。當(dāng)然給定對(duì)象的屬性和方法是由創(chuàng)建該對(duì)象實(shí)例的語(yǔ)言所定義的。正如上例VBScript的過(guò)程調(diào)用,當(dāng)從JScript中調(diào)用一個(gè)不帶參數(shù)的VBScript對(duì)象的方法時(shí),其調(diào)用方法也遵從JScript的調(diào)用規(guī)則,反之亦然。
二、數(shù)組管理
數(shù)組共享問(wèn)題稍微復(fù)雜一點(diǎn)。雖然數(shù)組也象其它變量一樣可以在不同語(yǔ)言腳本之間共享,但必須注意兼容方面的問(wèn)題。
VBScript數(shù)組在JScript下可以用VBScript的符號(hào)引用,即用myArray(2)引用數(shù)組元素而不是JScript的數(shù)組元素引用符號(hào)myArray[2]。此外,還可以使用一個(gè)特殊的JScript對(duì)象——VBArray對(duì)象將VBScript數(shù)組轉(zhuǎn)換為JScript數(shù)組。下面的代碼從VBScript數(shù)組myVBArray創(chuàng)建JScript數(shù)組myJSArray:
First, data sharing
In some cases the mixed-use VBScript and JScript function is very useful, but in different languages to share data between the script may also be useful. Achieve this shared approach is very simple: no matter what language is used, as long as the level of the page statement on the variables that can be invoked.
Targeted use similar methods, can be a suitable choice of the language to read, modify or call attributes of the object methods. Of course, given the object properties and methods by which it was created instance, as defined in the language. As the example of the procedure call VBScript, when the call from JScript parameters of a non-VBScript object methods, methods to comply with its call JScript call rules, and vice versa.
在某些情形下混合運(yùn)用VBScript和JScript函數(shù)是非常有用的,但在不同語(yǔ)言腳本之間共享數(shù)據(jù)也可能很有用。實(shí)現(xiàn)這種共享的方法很簡(jiǎn)單:不管使用的是什么語(yǔ)言,只要是在頁(yè)面級(jí)聲明的變量就可以任意引用。
對(duì)象的使用方法也相似,可以任意選用合適的語(yǔ)言讀取、修改屬性或調(diào)用對(duì)象的方法。當(dāng)然給定對(duì)象的屬性和方法是由創(chuàng)建該對(duì)象實(shí)例的語(yǔ)言所定義的。正如上例VBScript的過(guò)程調(diào)用,當(dāng)從JScript中調(diào)用一個(gè)不帶參數(shù)的VBScript對(duì)象的方法時(shí),其調(diào)用方法也遵從JScript的調(diào)用規(guī)則,反之亦然。
二、數(shù)組管理
數(shù)組共享問(wèn)題稍微復(fù)雜一點(diǎn)。雖然數(shù)組也象其它變量一樣可以在不同語(yǔ)言腳本之間共享,但必須注意兼容方面的問(wèn)題。
VBScript數(shù)組在JScript下可以用VBScript的符號(hào)引用,即用myArray(2)引用數(shù)組元素而不是JScript的數(shù)組元素引用符號(hào)myArray[2]。此外,還可以使用一個(gè)特殊的JScript對(duì)象——VBArray對(duì)象將VBScript數(shù)組轉(zhuǎn)換為JScript數(shù)組。下面的代碼從VBScript數(shù)組myVBArray創(chuàng)建JScript數(shù)組myJSArray:
First, data sharing
In some cases the mixed-use VBScript and JScript function is very useful, but in different languages to share data between the script may also be useful. Achieve this shared approach is very simple: no matter what language is used, as long as the level of the page statement on the variables that can be invoked.
Targeted use similar methods, can be a suitable choice of the language to read, modify or call attributes of the object methods. Of course, given the object properties and methods by which it was created instance, as defined in the language. As the example of the procedure call VBScript, when the call from JScript parameters of a non-VBScript object methods, methods to comply with its call JScript call rules, and vice versa.
TA們正在看...
- db52526-2007醬香型白酒.doc
- dctools測(cè)試項(xiàng)目(oqc).doc
- declarationofconformity-2010mdd原件.doc
- echa成員國(guó)委員會(huì)通過(guò)14個(gè)高關(guān)注物質(zhì).doc
- emc.ppt
- emc系列講座之一-結(jié)構(gòu)與線材設(shè)計(jì).ppt
- emi安規(guī).ppt
- en60335-1(chinese)-update.doc
- en1041-2008.doc
- en_980-2008_symbols_for_use_in_the_labelling_of...doc