多个frame传值.
主页面:
<frameset rows= "90,25,* " framespacing= "0 " border= "0 " frameborder= "0 ">
<frame src=a.html name= "a " scrolling= "no " noresize>
<frame src=b.html name= "b " scrolling= "no " noresize>
<frame src=c.html name= "main " scrolling=noresize style= "mso-linked-frame:auto " marginwidth= "0 " marginheight= "0 ">
</frameset>
a.html:
<table border= "0 " cellspacing= "0 " cellpadding= "5 " width= "100% ">
<tr>
<td align= "center ">
<form action= " " method= "get " name= "form1 "> <input type= "text " name= "textfield "> </form>
</td>
</tr>
</table>
c.html:
<div style= "z-index:999 " onmouseover= 'if(this.k==null){ck();this.k=1;} '> <img src= "sdfsdf.jpg "> </div>
<script> function ck()
{
parent.a.document.form1.textfield.value= "asdasd "
</script>
各位老大。。这样三个文件。。我想在c.html中鼠标移动图片上面。。在a.html中的input显示一个值怎么不行的啊。。帮帮忙啊。。急。。。。
------解决方案--------------------a.html中:
<input type= "text " id= "textfield ">
c.html中:
function fn()
{
parent.document.frames[ 'a '].document.getElementById( 'textfield ').value= "asdasd ";
}