<html><head><meta charset="utf-8"/><title>touch test</title></head><body><script type="text/javascript" src="touch/jquery-1.11.1.js" ></script><div id="box" style="width:100%;height:100%;border:1px solid red;"></div><script>function touchs(event){event.preventDefault();var box = $("#box");if(event.type=="touchstart"){ console.log('1'); $("#box").addClass("class"); console.log('1');}}box.addEventListener('touchstart',touchs,false);</script></body></html>直接跳過我追加的class了
touch觸摸追加class,沒有生效
開心每一天1111
2018-12-12 18:19:45