需要幫助我的簡單腳本,應該在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