delphi做这样的网页该用什么思路呢

来源:百度知道 编辑:UC知道 时间:2024/06/15 07:51:23
是个网页游戏,玩聊的时候玩玩,可是有些操作天天都是一样的,想自己写个自动工作的程序,

可是那些网上的很多显示的东西都是通过变量取得的。比如
<DIV class=navmenu> <SPAN id=nMainMenu> <A class="" onmousedown="om.setIcon(this,1,'chara','undefined')" id=chara onmouseover="om.setIcon(this,2,'chara','undefined')" onclick="javascript:om.clickmain('chara',this,'undefined','undefined');om.mainhintname='chara';om.main_hint_open('chara','');om.clickchild('charabasic','人物',this);om.setIcon(this,3,'chara','undefined')" onmouseout="om.setIcon(this,0,'chara','undefined')" href="javascript:void(0)" ?> <IMG alt=人物 src="http://img8.gamebto.com/gamebto/images/default/chara.gif"> </A>
<DIV style-?width:30px;?> <

用WebBrowser试试.
WebBrowser1.OleObject.document.parentWindow.execScript 执行网页里的javascript,或者模拟点击按钮.
如果你能弄明白的话.

用idhttp取这整个页的代码
Memo1.text:=idhttp.get('地址');
然后用pos就行了
你要的值:=copy(Memo1.text,pos('<B class=yellow id=user_yesterdayearning>',Memo1.text)+length(<B class=yellow id=user_yesterdayearning>),pos('</B>',Memo1.text)-pos('<B class=yellow id=user_yesterdayearning>',Memo1.text)-length(<B class=yellow id=user_yesterdayearning>));