JavaScript Reference/Javascript Methods/execScript — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 2010
"execScript()" Example
<html>
<body>
<script language="JavaScript">
function function1() {
var m = window.execScript("alert("test");", "JavaScript");
alert("The method returns always "+"""+m+""");
}
</script>
<input type="button" value="Click to execute the script" onclick="function1();">
</body>
</html>
"execScript()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |window |
+----------------+--------------------------------------------------------------+
"execScript()" Syntax, Parameters and Note
Note:
Executes a script. Always returns undefined.
Syntax:
window.execScript(param1, param2)
Parameters:
param1 Required; the code to execute.
param2 Required; the code"s script language.