鼠标滑过超链接自动点击代码
一、只执行一次自动点击的代码:
<html>
<body>
<script language="JavaScript" type="text/JavaScript">
var click=false;
var clicknum = 1
function autoclick()
{
if(!click && clicknum==1)
{
var source=event.srcElement;source.click();
clicknum+=1;
}
}
</script>
<a href="http://www.sirit.com.cn" target="_blank" onmouseover="autoclick()">移到这里,就会自动打开大嘴狗狗!</a>
</body>
</html>
二、每次都执行自动点击的代码:
<html>
<body>
<script language="JavaScript" type="text/JavaScript">
var click=false;
function autoclick()
{
if(!click)
{
var source=event.srcElement;source.click();
}
}
</script>
<a href="http://www.sirit.com.cn" target="_blank" onmouseover="autoclick()"><b>移到这里,就会自动打开大嘴狗狗</a>
</body>
</html>
三、自动点击图片链接的代码:
<html>
<body>
<script language="JavaScript" type="text/JavaScript">
var click=false;
function autoclick()
{
if(!click)
{
var source=event.srcElement;source.click();
}
}
</script>
<a href="https://www.sirit.com.cn" target="_blank" onmouseover="autoclick()"><img src="https://www.sirit.com.cn/siritlogo.png" border="0"></a>
</body>
</html>