日期:2014-05-20  浏览次数:20590 次

非常紧急,等待救命,关于JavaScript
我在HTML里插入ActiveX控件时,用 <embed> 来操作控件,如:
<EMBED   name=Nb1   src=structures/Nb1.xyz   width=200   height=200>
用于显示
<embed   width=20   height=20   target=Nb1   type=application/x-spt   button=push   script= "zoom   80 ">
用于控制,点击时会执行script属性里的语句

于是我想用
<script>
function   f(){
aaa.script   =   document.all.bbb.value;
alert(document.all.aaa.script);
}
</script>
<embed   width=20   height=20   name=aaa   target=Nb1   type=application/x-spt   button=push   script= " ">
<input   id=bbb   type=text   size=30>
<input   type=button   onclick=f()>
来试做一个可以让用户输入script语句的东西,但是测试发现,虽然可以将 <embed> 里的script属性设置好,但是再点击 <embed> 按钮,却似乎没有反应

所以我希望各位高手能救救小弟,我只剩20分了,全部奉上,谢谢

------解决方案--------------------
不会

------解决方案--------------------
这样行吗?

<input type= "text " id= "script " />
<input type= "button " value= "evaluate " onclick= "eval(document.getElementById( 'script ').value) " />