Form mshtml. HTMLFormElementClass
IHTMLDocument2 mydocument = (IHTMLDocument2) web. Document;
[Pay-as-you-go]: IHTMLElement
Object obj1 = mydocument. all. item ("UG", 0 );
If (obj1 is IHTMLElement)
{
(IHTMLElement) obj1). click ();
}
Object obj1 = mydocument. all. item ("BetList", 0 );
If (obj1 is IHTMLElement)
{
Datatext. Text = (IHTMLElement) obj1). innerText;
}
Input [output file]: IHTMLInputElement Element
Object obj1 = mydocument. all. item ("username", 0 );
If (obj1 is IHTMLInputElement)
{
(IHTMLInputElement) obj1). value = "Set User Name value ";
}
Form frame: HTMLFrameElementClass
Object obj1 = mydocument. all. item ("main", 0 );
If (obj1 is HTMLFrameElementClass)
{
Obj1 = (HTMLFrameElementClass) obj1;
}
Open the new page in the specified box: frame
Object obj1 = mydocument. all. item ("main", 0 );
If (obj1 is HTMLFrameElementClass)
{
(HTMLFrameElementClass) obj1).content##window.exe cScript ("document. location = ''http: //" + host + "/en-lang/underover/main. asp? T = l''; "," javascript ");
}
Obtain the specified frame and the element value and source code of the frame.
Object obj1 = mydocument. all. item ("main", 0 );
If (obj1 is HTMLFrameElementClass)
{
Object obj2 = (HTMLFrameElementClass) obj1).contentcontactdoc ument. all. item ("BetList", 0 );
If (obj2 is IHTMLElement)
{
Datatext. Text = (IHTMLElement) obj2). innerText; // element value
Datatext. AppendText (IHTMLElement) obj2). innerHTML); // source code
Datatext. AppendText (HTMLFrameElementClass) obj1). contentWindow. location. href); // The source URL in the box
}
}
Such frameworks: iframe
HTMLIFrameClass
Object obj2 = (HTMLFrameElementClass) obj1).content+doc ument. all. item ("maintt", 0 );
Object obj3 = (mshtml. HTMLIFrameClass) obj20000.content0000doc ument. all. item ("BetList", 0 );
If (obj3 is IHTMLElement)
{
Datatext. Text = (IHTMLElement) obj3). innerText;
// Datatext. AppendText (IHTMLElement) obj2). innerHTML );
Datatext. AppendText (urlstr );
}
Document. formname. action = parent. yourpage;