1.html<form id="form1" name="form1" method="post" action="">
<label>
<input type="text" name="P_Name" id="P_Name" />
</label>
<span class="bigtitle">
<input type="button" name="button" id="button" value="点击上传图片" onclick="Window.open('2.html?strType=pic&inputname=P_Name',560,380,window);" />
</span>
</form>2.html
<IFRAME id="FolderList" width="100%" height="430" frameborder="1" src="3.html"></IFRAME>3.html
<input type="text" name="str" id="str" value="ok" />
请问怎么在3.html里把str的value传递到1.html中的id="P_Name"中去呢?
<label>
<input type="text" name="P_Name" id="P_Name" />
</label>
<span class="bigtitle">
<input type="button" name="button" id="button" value="点击上传图片" onclick="Window.open('2.html?strType=pic&inputname=P_Name',560,380,window);" />
</span>
</form>2.html
<IFRAME id="FolderList" width="100%" height="430" frameborder="1" src="3.html"></IFRAME>3.html
<input type="text" name="str" id="str" value="ok" />
请问怎么在3.html里把str的value传递到1.html中的id="P_Name"中去呢?
parent.opener.document.getElementById('P_Name').value='test';
<input type="button" onclick="parent.opener.document.getElementById('P_Name').value='test';"/>
<input type="button" onclick="parent.opener.document.getElementById('P_Name').value=document.getElementById('str').value;"/>
在你的 2.html 中加上这句话,看看能行不 我这边是可以的 一直都是这么用