如果在一个弹出窗口里的 html控件 js 咋么获取?
a.html 的弹出层 <div id="myHiddenDiv"> 里有这些html控件:
<iframe src="/ajaxupload/fileimg.php?fieldname=pdfname&res=res&uri=uriPdf" class="ifrm" scrolling="No" frameborder="0"></iframe>
<input type="text" id="uriPdf" value="文件路径" readonly="true" style="width:400px; background:#FFCC00;" name="uriPdf" />
<input type="text" id="pdfname" value="文件名" readonly="true" style="width:200px; background:#FFCC00;" name="pdfname" />
我在 fileimg.php 里这么写,
parent.document.all('<?php echo $fieldname;?>').value=filename;
parent.document.all('<?php echo $uri;?>').value=uri;
可是 除非 uriPdf 和 pdfname 在<div id="myHiddenDiv"> 这个弹出窗口层之外,也就是直接写在 a.html 里, 才能找到,
否则根本没反应,怎么办?
怎么使得 parent 是这个弹出层? 而不是 a.html ?