<script >
// 禁用默认行为
document.addEventListener("touchstart", function(ev) {
ev = ev || event;
ev.preventDefault();
});
// 给a标签设置跳转,可以防误触
var aNodes = document.querySelectorAll("a");
for(var i=0; i<aNodes.length; i++) {
aNodes[i].addEventListener("touchstart", function() {
this.isMoved = false;
});
aNodes[i].addEventListener("touchmove", function() {
this.isMoved = true;
});
aNodes[i].addEventListener("touchend", function() {
if (!this.isMoved) {
location.href = this.location;
}
});
}
</script>