子窗口程序为:
<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文本框中输入文字