<script> window.onload = function(){ function autoclick(){ var url = document.getElementById('btn').href;//获取要点击的a标签 window.location.href= url; } setTimeout(autoclick, 1000) } </script>