网页修改代码

//1
IHTMLDocument2 *document;
IHTMLElement *body;
(void *)document=CWB->Document;
IHTMLElementCollection *collection;
document->get_all(&collection);
long count_links;
collection->get_length(&count_links);
for(int i=0;iitem(v1,v1,&linkDisp);
if(linkDisp!=NULL)
{ //3
WideString url;
linkDisp->QueryInterface(IID_IHTMLElement,(void**)&body);
body->get_outerHTML(&url);
String temp=String(url);
String S[3];
/* IE 8 //S[0]=L1->Items->Strings[13];
S[1]=L1->Items->Strings[14];
S[2]=L1->Items->Strings[16];
*/
S[0]=L1->Items->Strings[21];
S[1]=L1->Items->Strings[22];
S[2]=L1->Items->Strings[23];
if(temp.Length()<200&&temp.Length()>10)
{ //4
if(temp==S[0]||temp==S[1]||temp==S[2])
{
temp.Insert("value=5 ",19);
url=WideString(temp);
body->put_outerHTML(url);
re=true;
}
else if(temp.SubString(1,15)==L1->Items->Strings[8])
{
for(int i=1;iItems->Strings[20])
{
//value=1 type=radio IE8
body->click();
re=true;
break;
}
}
}
}//4
} //3
} //2
}//1