Android不支持web页滚动,以下答案来源网络其他人的回答,德问网上有。

测试以下方法可行。

function noBarsOnTouchScreen(arg){  var elem, tx, ty;  if('ontouchstart' in document.documentElement ) {          if (elem = document.getElementById(arg)) {              elem.style.overflow = 'hidden';              elem.ontouchstart = ts;              elem.ontouchmove = tm;          }  }  function ts( e )  {    var tch;    if(  e.touches.length == 1 )    {      e.stopPropagation();      tch = e.touches[ 0 ];      tx = tch.pageX;      ty = tch.pageY;    }  }  function tm( e )  {    var tch;    if(  e.touches.length == 1 )    {      e.preventDefault();      e.stopPropagation();      tch = e.touches[ 0 ];      this.scrollTop +=  ty - tch.pageY;      ty = tch.pageY;    }  }}//调用的时候:noBarsOnTouchScreen(divId);

更多相关文章

  1. Android - Android 面试题集 -- Android 部分答案
  2. Android初级工程师面试题答案——Android题型
  3. 《Android移动应用基础教程》(Android Studio)(第二版)黑马教程 课后
  4. Android面试题收集(有具体答案)
  5. 《Android移动应用基础教程》(Android Studio)(第二版)黑马教程 课后
  6. Android 面试题集 & 答案,助你拿到心仪 Offer
  7. 《Android移动应用基础教程》(Android Studio)(第二版)黑马教程 课后

随机推荐

  1. Fragment、Activity比较——Android碎片
  2. Android(安卓)中ListView setOnItemClick
  3. android之知识点小结一
  4. Android布局属性详解
  5. 2013.08.15——— android Fragment的简
  6. 让EditView只能输入电话号码 同时还是密
  7. Android 短信 彩信 wap push的接收
  8. 最新Android ADT, SDK, SDK_tool等官方下
  9. android sms发送、接收及格式
  10. Android布局