JavaScript Reference/Javascript Methods/execScript
Версия от 18:30, 25 мая 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.