<form name=ff ......>
........
 <input type=submit value=确认 name=submit >
 <input type=reset value=取消 name=reset>
........
</form>表单如上.(其他定义未列出)我用 WebBrowser.OleObject.Document.ff.aa.value:='abcd'; 填充表单ff中的aa这个文本框,这一步没有问题.
但我一使用 WebBrowser.OleObject.Document.ff.submit; 提交表单时,编译器就提示"没发现成员!".明明都有定义submit,为什么说没发现呢?这该怎么办?

解决方案 »

  1.   

    uses MSHTML;
    ((WebBrowse1.Document as IHTMLDocument2).All['aa'] as IHTMLInputButton2).submit();看看这样,没有测试,对按钮的接口名记得不太清楚了
      

  2.   

    语法检查未通过.
    我水平有限,无法纠正其中不妥之处,还请 Eastunfail(浴血雏龙)==(恶鱼杀手) 明示!
      

  3.   

    有个VB的,供参考一下Dim vDoc, vTag
        Dim i As Integer
          
        Set vDoc = WebBrowser1.Document.frames.Item(2).frames.Item(1).Document    For i = 0 To vDoc.All.length - 1
            If UCase(vDoc.All(i).tagName) = "INPUT" Then
                Set vTag = vDoc.All(i)
                If vTag.Type = "button" Then
                    vTag.Click
                End If
            End If
        Next i
      

  4.   

    <form name=ff ......>
    ........
      <input type=file name="fileUp">
     <input type=submit value=确认 name=submit >
     <input type=reset value=取消 name=reset>
    ........
    </form>
    就不能赋值了,还需要高手指正!!