try
---------------------------------------
<script type="text/javascript" >
window.execScript("function DD(){window.alert('hello');}","javascript");
</script>
<form name="form1" action="">
<input type="button" name="Submit" value="按钮" onclick="DD();">
</form>
</body>
---------------------------------------
<script type="text/javascript" >
window.execScript("function DD(){window.alert('hello');}","javascript");
</script>
<form name="form1" action="">
<input type="button" name="Submit" value="按钮" onclick="DD();">
</form>
</body>
解决方案 »
- fusioncharts free 谁用过,谁封装过
- 使用wz_jsgraphics.js画的图,如何实现微调?
- jquery treeview 当只有一个根节点时,无法显示
- 如何判断字符为特殊字符
- 急!!!opera下rows的问题!
- 使用JS调用数据的时候,完成之前页面下方都显示不了,怎样可以显示并给出正在加载
- 请问各位大哥这个是什么意思?document.all.
- 能不能在正则表达式里使用变量?
- 如何实现自动submit
- frame与滤镜的问题
- javascript中‘二进制数组’ 申明、付值、作参数传给方法 怎么写?
- HTML中,一个textbox的内容改变后,离开焦点,然后另外一个textbox的内容变成一样的,在线等,急
浏览器也不支持
<script>
function DD(){
document.write("ok");
}
DD();
</script>
</div>
这样也不能实现吗?
document.getElementById("1").innerHTML=s;
eval(function DD(){window.alert(\"hello\");})
<body>
<div id="1"></div>
<script type="text/javascript" >var str="function DD(){window.alert(\"hello\");}";
var obj=document.getElementById("1");
var s=document.createElement("script");
s.text=str;
obj.appendChild(s)
</script>
<form name="form1" action="">
<input type="button" name="Submit" value="按钮" onclick="DD();">
</form>
</body>