用VB做模拟点击器
我想做一个模拟点击的程序,如果网页的代码如下:
<html>
<head>
<style>
body {
margin: 0 0 0 0;
}
a {
text-decoration: none;
color: blue;
}
</style>
</head>
<body bgcolor="white">
<script>
function next(num) {
if(x == 0) {parent.location.href='surfclickfinal.php?button_clicked='+num+'&id=13&pretime=1112578434&sid=2645TlRNNE56TXhOakEz&sid2=2645T&siduid=2645&';}
else {
alert("You must wait for the counter to reach 0");
}
}
x=6;
function change_content(obj, num) {
if (document.getElementById) {el = document.getElementById(obj) ;}
else if (document.all){ el = document.all[obj]; }
else if (document.layers) {el = document.layers[obj];}
el.innerHTML = "<b>"+num+"</b>";
}
function timer() {
x--;
if(x == 0) {var show="Click 6";}
else {
var show=x;
setTimeout('timer()', 1000);
}
change_content('timer', show)
}
</script>
<div align="center">
<table>
<tr>
<td>
<font size="3"><div align="center" id="timer">Loading...</div></font>
<a href="#" onclick="next(0)" id="button0"><img src="clickimages/2.gif" border=0></a><a href="#" onclick="next(1)" id="button1"><img src="clickimages/5.gif" border=0></a><a href="#" onclick="next(2)" id="button2"><img src="clickimages/6.gif" border=0></a><a href="#" onclick="next(3)" id="button3"><img src="clickimages/7.gif" border=0></a>
</td>
<td width=30></td><td><a href="bannerclick.php?id=" target="_blank"><img src="" border=0" width="468" height="60"></a></td>
</tr>
</table>
</div>
<script>
timer()
</script>
</body>
</html>
在网页执行完后,我想模拟点击第二个图片链接应该怎么做?
谢谢!!!
问题点数:0、回复次数:2Top
1 楼labixiaoxing(你好,微软)回复于 2005-04-06 22:13:25 得分 0
用dhtml
然后,img(2).clickTop
2 楼lpi()回复于 2005-04-10 22:38:24 得分 0
楼上的,用dhtml怎么做,能否说明白点?Top




