首页 > 微信 > 详细

微信按住说话HTML实现

时间:2015-05-13 19:46:04      阅读:3178      评论:0      收藏:0      [点我收藏+]

直接看代码来得快:


<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />


<button id="hhhh">按住说话</button>

  <style type="text/css">
      #hhhh{height:40px;line-height: 40px; text-align: center; background: #f00; color:#fff;}
  </style>

  <script>
  document.getElementById('hhhh').addEventListener('touchstart', function(ev) {
           ev.preventDefault();
           this.style.background = '#f00';
           //your start record code here...
        }, false);
  document.getElementById('hhhh').addEventListener('touchend', function(ev) {
          ev.preventDefault();
           this.style.background  = '#0f0';
           //your stop record code here...
        }, false);

</script>


微信按住说话HTML实现

原文:http://blog.csdn.net/wujiangwei567/article/details/45696441

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!