<DIV class=smallFont id=npcList style=/"PADDING-RIGHT: 10px; OVERFLOW-Y: auto; PADDING-LEFT: 10px; Z-INDEX: 10; LEFT: 338px; VISIBILITY: visible; PADDING-BOTTOM: 5px; WIDTH: 172px; PADDING-TOP: 5px; POSITION: absolute; TOP: 0px; HEIGHT: 200px; BACKGROUND-COLOR: #a0cad8/"><DT id=npc_0><A class=black hideFocus onclick=/"return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><SPAN title=查看 onclick=/"p.showPetInfo(0,'机警小鸡',49597282678812,[false,false,false,true]);p.setFuJi('0');return false;/">机警小鸡<IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=5 border=0></SPAN><A title=攻击 onclick=/"p.cmd('bar34 0 49597282678812');event.cancelBubble=true;return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><IMG src=/"http://s34.pet.mop.com/img/button/a.gif/" border=0><IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=3 border=0></A></A></DT>/r/n<DT id=npc_1><A class=black hideFocus onclick=/"return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><SPAN title=查看 onclick=/"p.
showPetInfo(1,'波力',53214788260420,[false,false,false,true]);p.setFuJi('1');return false;/">波力<IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=5 border=0></SPAN><A title=攻击 onclick=/"p.cmd('bar34 1 53214788260420');event.cancelBubble=true;return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><IMG src=/"http://s34.pet.mop.com/img/button/a.gif/" border=0><IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=3 border=0></A></A></DT>/r/n<DT id=npc_2><A class=black hideFocus onclick=/"return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><SPAN title=查看 onclick=/"p.showPetInfo(2,'绿毛虫',53266234265716,[false,false,false,true]);p.setFuJi('2');return false;/">绿毛虫<IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=5 border=0></SPAN><A title=攻击 onclick=/"p.cmd('bar34 2 53266234265716');event.cancelBubble=true;return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><IMG src=/"http://s34.pet.mop.com/img/button/a.gif/" border=0><IMG height=11 src=/"http://s34.pet.m
op.com/img/blank.gif/" width=3 border=0></A></A></DT>/r/n<DT id=npc_3><A class=black hideFocus onclick=/"return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><SPAN title=查看 onclick=/"p.showPetInfo(3,'黑蘑菇',53266214185308,[false,false,false,true]);p.setFuJi('3');return false;/">黑蘑菇<IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=5 border=0></SPAN><A title=攻击 onclick=/"p.cmd('bar34 3 53266214185308');event.cancelBubble=true;return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><IMG src=/"http://s34.pet.mop.com/img/button/a.gif/" border=0><IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=3 border=0></A></A></DT>/r/n<DT id=npc_4><A class=black hideFocus onclick=/"return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><SPAN title=查看 onclick=/"p.showPetInfo(4,'黑蘑菇',53214828421236,[false,false,false,true]);p.setFuJi('4');return false;/">黑蘑菇<IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=5 border=0></SPAN><A title=攻击 onclick=/"p.cmd('bar34 4 532148
28421236');event.cancelBubble=true;return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><IMG src=/"http://s34.pet.mop.com/img/button/a.gif/" border=0><IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=3 border=0></A></A></DT>/r/n<DT id=npc_5><A class=black hideFocus onclick=/"return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><SPAN title=查看 onclick=/"p.showPetInfo(5,'小鸡',53950172962196,[false,false,false,true]);p.setFuJi('5');return false;/">小鸡<IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=5 border=0></SPAN><A title=攻击 onclick=/"p.cmd('bar34 5 53950172962196');event.cancelBubble=true;return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><IMG src=/"http://s34.pet.mop.com/img/button/a.gif/" border=0><IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=3 border=0></A></A></DT>/r/n<DT id=npc_6><A class=black hideFocus onclick=/"return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><SPAN title=查看 onclick=/"p.showPetInfo(6,'波力',5514270823
2500,[false,false,false,true]);p.setFuJi('6');return false;/">波力<IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=5 border=0></SPAN><A title=攻击 onclick=/"p.cmd('bar34 6 55142708232500');event.cancelBubble=true;return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><IMG src=/"http://s34.pet.mop.com/img/button/a.gif/" border=0><IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=3 border=0></A></A></DT></DIV>"
以上为网页中的代码
在c#z中
HTMLDivElement npclist = (HTMLDivElement)petWin.contentWindow.document.all.item("npclist", 0);
HTMLDocument dd = (HTMLDocument)(npclist.document);
通过dd.getElementById("npc_0").innerHTML可得到
"<A class=black hideFocus onclick=/"return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><SPAN title=查看 onclick=/"p.showPetInfo(0,'机警小鸡',49597282678812,[false,false,false,true]);p.setFuJi('0');return false;/">机警小鸡<IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=5 border=0></SPAN><A title=攻击 onclick=/"p.cmd('bar34 0 49597282678812');event.cancelBubble=true;return false;/" href=/"http://s34.pet.mop.com/petwin.html#/"><IMG src=/"http://s34.pet.mop.com/img/button/a.gif/" border=0><IMG height=11 src=/"http://s34.pet.mop.com/img/blank.gif/" width=3 border=0></A></A>"