需要帮助我的简单脚本,应该在5秒后自动点击下一个。Javascript onload运行功能帮助
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>
</title>
<script type="text/javascript">
window.onload = Next() {
setTimeout(Next() {
var next = document.getElementById("NEXT");
window.location.href = next.href;
}, 5000);
}
</script>
</head>
<body>
<div align="right">
<a id="NEXT" href="http://www.mysite.com/pictures.php?id=34">[ NEXT ]</a>
</div>
</body>
</html>
现在,是什么问题? – jams 2011-05-15 00:16:17
是你的代码不工作? – jams 2011-05-15 00:17:50
@Thomas'click()'不起作用;) – Raynos 2011-05-15 00:20:06