<script> window.onload = function(){ function autoclick(){ var url = document.getElementById(‘btn‘).href;//获取要点击的a标签 window.location.href= url; } setTimeout(autoclick, 1000) } </script>
页面打开直接执行a点击事件
原文:http://www.cnblogs.com/djdliu/p/5591950.html