javascript - 手机端网页的轮番滚动问题,我想添加两个按钮,点击按钮切换到下一个,触摸屏幕时不切换
<script language="JavaScript" type="text/javascript" src="js/ObjectViewer_2D.js"></script>
<script language="JavaScript" type="text/javascript" src="js/ObjectViewer_1D.js"></script>
<script type="text/javascript">
var oId1 = document.getElementById('d1');
var oId2 = document.getElementById('d2');
oId1.onclick = function(){
this.style.display = 'none';
oId2.style.display = 'block';
}
oId2.onclick = function(){
this.style.display = 'none';
oId1.style.display = 'block';
}
</script>
像上面这样 在pc端 点击 是可以切换的 但是在移动端不可以 求大神帮忙