document.getElementById("InputID").value = window.frames["iframeName"].document.getElementById("SelectID").value;

解决方案 »

  1.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><body>
    <iframe name="test"></iframe><br><input type="text" name="textfield1">
    <input type="button" name="Button" value="Button" onClick="textfield1.value=test.select1.value">
    <script language="JavaScript">
    test.document.write("<select name='select1'><option value='111'>111</option><option value='222'>222</option><option value='333'>333</option></select>")
    </script>
    </body>
    </html>