子窗口和父窗口的交互问题,希望大家帮助 加上这句window.opener.document.getElementById('username').value=printhtml;就OK了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script language="javascript"> function to_to(s){ var printhtml = ""; printhtml += " <form name='f' action='test.php' method='POST'>"; printhtml += " <input type='text' id='username' name='username' value='" + s + "'>"; printhtml += " <input type='submit'>"; printhtml += " </form>"; opener.document.getElementById("msg").innerHTML = printhtml;}</script><a href=# onclick="to_to('要输入的文字')">check</a> 那同时在printhtml中的username文本框输入文字,如何解决呀? <script language="javascript"> function to_to(){ var printhtml = " <html>body>"; printhtml += " <form name='f' action='test.php' method='POST'>"; printhtml += " <input type='text' id='username' name='username'>"; printhtml += " <input type='submit'>"; printhtml += " </form>"; printhtml += " </body> </html>"; window.opener.document.getElementById('msg').innerText=printhtml; window.opener.document.getElementById('username').value="输入名称";} </script> window.opener.document.getElementById('msg').innerText=printhtml; 换成window.opener.document.getElementById("msg").innerHTML = printhtml; 带有html的 如何用jquery去掉父元素 编写的网页,为什么桌面文件夹中图片显示不出来 各位高手帮忙看看,急! 按住左键 在table上拖选一块区域 拖选完后,想获得 td的id 谁解释下节点的Node.normalize方法,谢谢。 js的弹出菜单,看不懂,谁可以帮我加注释? 找到 div 下边 div 类名是 .pic_manager_li_ok 有没有办法使子网页控制父网页的内容?用javascript实现,有没有办法了?请把代码共享一下好吗? 关于页面刷新的问题? 关于多页面之间切换的问题 javaScript 通过域名解析成IP地址,我只能通过JavaScript和html来实现
function to_to(s){
var printhtml = "";
printhtml += " <form name='f' action='test.php' method='POST'>";
printhtml += " <input type='text' id='username' name='username' value='" + s + "'>";
printhtml += " <input type='submit'>";
printhtml += " </form>";
opener.document.getElementById("msg").innerHTML = printhtml;
}
</script>
<a href=# onclick="to_to('要输入的文字')">check</a>
<script language="javascript">
function to_to(){ var printhtml = " <html>body>";
printhtml += " <form name='f' action='test.php' method='POST'>";
printhtml += " <input type='text' id='username' name='username'>";
printhtml += " <input type='submit'>";
printhtml += " </form>";
printhtml += " </body> </html>";
window.opener.document.getElementById('msg').innerText=printhtml; window.opener.document.getElementById('username').value="输入名称";
}
</script>
换成window.opener.document.getElementById("msg").innerHTML = printhtml; 带有html的