子窗口程序为:
<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>";
}
</script><a href=# onclick="to_to()">check</a>问题:点击check,执行to_to(),将printhtml写入到父窗口的<div id="msg"></div>同时在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>";
}
</script><a href=# onclick="to_to()">check</a>问题:点击check,执行to_to(),将printhtml写入到父窗口的<div id="msg"></div>同时在username文本框中输入文字
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货