English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How do you use it?? please explain in detail......

2006-06-08 12:56:54 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

1 answers

execScript is not cross-browser and only works in IE. You would only use it to, for some reason, run another language's code (ie., VBscript) inside a Jscript, in IE.
If you actually just want to run a (variable) string as javascript, you can use the standard eval(string) function to evaluate the expression "string" as javascript. This is part of the ECMAscript standard, which both Jscript (IE) and javascript (Netscape/Mozilla) are implementations of, so it is cross-browser. See http://www.ecma-international.org/publications/standards/Ecma-262.htm , http://msdn.microsoft.com/library/en-us/script56/html/85587e39-9325-4b75-b9f9-9d7d475a2120.asp?frame=true , and especially http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Functions:eval#Examples .

2006-06-08 17:21:15 · answer #1 · answered by Ron 6 · 0 0

fedest.com, questions and answers