JS设置自动点击按钮

<p><input type="button" id="change" class="button" hidden  value="x" style="width: 20px;height:20px;text-align: center;position: absolute;top: -3px;right: 15px;margin: 0;padding: 0;background: #fff;color:#000;border-radius:10px;"></p>
<script type="text/javascript">
          $(function(){
              setTimeout(function(){
                  var buy = document.getElementById('change');//给你的a标签加一个id :btnBuy
                  buy.click(popup.close());
              },3000);//后面的3000是以毫秒为单位。
          });
</script>

猜你喜欢

转载自blog.csdn.net/qq_41467799/article/details/81066576
今日推荐