有左右ab框架,a框架触发b框架中的js函数 用var oForm=parent.frames['main'].document.getElementById("framename")oForm.action="test.jsp";oForm.submit(); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 txh but 错不是表单提交啊如何让a的 bt1 事件 触发 test() 执行啊 parent.frames['你的框架名字']或你的框架名字.document.all.test()parent.frames['你的框架名字']或你的框架名字.document.all.viewopt.value="洛林"PS: 没有验证过 a.htm <input type=button name=bt1 onclick="dotest();"><script>function dotest(){ self.top.frames['b'].test();//此处就调用了b.html中的test函数了}</script>b.htm<script language=javascript>viewopt="zoomin";function test(){alert("triggled by a");}</script> 至于赋值 你可以将b.html中的viewopt="zoomin";改为a.htm <form><input type=button name=bt1 onclick="dotest();"><input type=text name=textName value="11"> <form><script>function dotest(){ self.top.frames['b'].test();//此处就调用了b.html中的test函数了}</script>b.htm<script language=javascript>viewopt=self.top.frame['a'].document.all('textName').value;//此处就是a.html中text的值11function test(){alert("triggled by a");}</script> 同意longshenwang(独眼龙) ,观点,longshenwang(独眼龙) 你的动作真是快 关于点击左边的菜单 在右边增加一个tab的问题??? 关于js获取div的id,然后循环判断 请问js里的window对象有没有destroy属性/方法? 请教打开网页时会不会出现javascript没有被加载的情况? input 检查怎么没有效果啊? 第二个值为什么显示不出来 ? 不知道能不能区分这2个对象? 在frame里怎么跳出frame? 请问怎么从javascript调用flash的actionscript? 能不能用鼠标取得当前所指的对象作为一个变量传到另一个页面? 帮个忙很简单的问题了 能不能多次在同一个窗口中显示showModelessDialog的内容?
but 错
不是表单提交啊如何让a的 bt1 事件 触发 test() 执行啊
parent.frames['你的框架名字']或你的框架名字.document.all.viewopt.value="洛林"PS: 没有验证过
<input type=button name=bt1 onclick="dotest();">
<script>
function dotest(){
self.top.frames['b'].test();//此处就调用了b.html中的test函数了
}
</script>b.htm
<script language=javascript>
viewopt="zoomin";
function test(){
alert("triggled by a");}
</script>
a.htm
<form>
<input type=button name=bt1 onclick="dotest();">
<input type=text name=textName value="11">
<form>
<script>
function dotest(){
self.top.frames['b'].test();//此处就调用了b.html中的test函数了
}
</script>b.htm
<script language=javascript>
viewopt=self.top.frame['a'].document.all('textName').value;//此处就是a.html中text的值11
function test(){
alert("triggled by a");}
</script>