document.configIframe.role.value = x;
document.configIframe.submit();

解决方案 »

  1.   

    sorry
    document.configIframe.submit(); --> document.configIframe.configForm.submit();
      

  2.   

    我本来也这调用,可是没反应,document.configIframe.configForm 为空或不是对象
      

  3.   

    试试
    frames["configIframe"].document.configForm
    绝对没有问题的 
    给分吧
      

  4.   

    <script>
    function onSubmit(obj) {
    // alert(obj.role.value);
    var iframeObj;
    var iframeDoc; iframeObj = document.frames["configIframe"];
    if (iframeObj.contentDocument) {
    // For NS6
      iframeDoc = iframeObj.contentDocument;
    } else if (iframeObj.contentWindow) {
      // For IE5.5 and IE6
      iframeDoc = iframeObj.contentWindow.document;
    } else if (iframeObj.document) {
      // For IE5
      iframeDoc = iframeObj.document;
    } alert(iframeObj.document.getElementById("configForm1"));}
    </script>
                                  <input type="button" onClick="onSubmit(this.form)" name="kydaFormSubmit" value="更  新" class="button">
    <div style="display:none">
    <iframe id="configIframe"><input type="hidden" name="url">
    <form id="configForm1" name="configForm" action="test.jsp">
    <input type="hidden" name="role">
    </form>
    </iframe><script>
    alert(document.configForm.role.value)
    </script>
    </div>