document.frames("IframeName").document.formname.submit()

解决方案 »

  1.   

    也可以这样:
    document.frames("iframeName").document.formname.submitName.click()
      

  2.   

    例子:
    index.htm
    ===============
    <iframe name=mxh src="a.htm"></iframe>
    <input type=button value=submit onclick='document.frames("mxh").document.f.submit()'>a.htm
    ================
    <form name=f action="xx.asp" target="_blank">
    <input type=text name=txt>
    </form>
      

  3.   

    对了
    孟子,为什么有的可以用
    name
    有的可以用id那??
    能解释一下吗?
      

  4.   

    id屬於dhtml,name屬於html
    都可以用來'定位'
      

  5.   

    應該也可以直接用
    FrameName.formName.submit();