主页面:
<frameset name="fstmain" cols="219,*" frameborder="1" framespacing="10" bordercolor="#3366cc" >
      <frame name="fmytree" src="tree.html" marginheight="0"  />
      <frame name="fmyshow"  marginheight="0"  scrolling="yes" src="">" />
</frameset>左页面方法:
function myMethod(str){
   window.open("myshow.html",'fmyshow');
   alert(str);
   top.fmyshow.myshow.value=str;
   }
右页面的备选页面:myshow.html 它里面有一个text:<p><input type="text" name="myshow" size="40"></p>要求,点击左页面的控件执行方法myMethod,让右框体中出现myshow.html 页面,
并对出现myshow.html 页面的name="myshow" 这个控件设一个值。
目前打开myshow.html页面已经实现,对这个页面控件设值就没有搞出来。请问高手如何实现

解决方案 »

  1.   

    设值?给textbox一个id
    然后通过这个id给textbox赋值,不就好了?
    id.value = xxx
    或是document.getElementById("id").value = xxx
      

  2.   

    to:supermanyan10()
    你这样做用框架试过了吗
      

  3.   

    你试试这样,应该可以解决你说的问题。
    window.parent.frames['fmyshow'].forms('表单名称').myshow.value
      

  4.   

    window.parent.frames['fmyshow'].forms('表单名称').myshow.value
    是myshow.html这个页面里面你的表单项目<input type="text" name="myshow" size="40">的值
      

  5.   

    to:TaiNo(疯狂萨满)
    还是不行啊,它老是提示“目标为空或不是对象”
      

  6.   

    它只能检查到这一步:alert(window.parent.frames["fmyshow"]);
    再往下面的控件就会报错了!
      

  7.   

    用这样的写法可以得到开启控件的对象,
    alert(window.parent.frames["fmyshow"].myf1.p010.value);用下面的方法可以改变右页面的对象的值,但是它改变了之后马上又给改回到原来静态页面写的值
       window.parent.frames["fmyshow"].myf1.p010.value="中华人民共和国成立了!";如果没有:window.open("myshow.html",'fmyshow'); 这一句话传值就没有问题了!但你不打开页面到右边的框架内又如何对这个页面进行操作呢?晕s,好像window.open这句话被程序自动移到了最后才执行一样。
    真是不明白。
      

  8.   

    你延时一下就可以了,你试试看。
    setTimeout(window.parent.frames['fmyshow'].myf1.p010.value='中华人民共和国成立了!',1000)
      

  9.   

    to:TaiNo(疯狂萨满)setTimeout(window.parent.frames['fmyshow'].myf1.p010.value='中华人民共和国成立了!',1000)这样做不行!
      

  10.   

    我自己试了一下,是可以的,我是先alert然后setTimeout()。
    你试试在中间加个alert(),然后再对新页面内的表单项目进行赋值。