touch事件学习

    window.onload = function(){

        var touch = {

            movetarget : false,

            touchStart : function (e) {
console.log('touchestart');
t = e.touches[0];
console.log(t.clientX + ':' + t.clientY);
}, touchMove : function(e){ //touchstart
console.log(e.type);
this.movetarget = e;
t = e.touches[0];
console.log(t.clientX + ':' + t.clientY);
oElement = document.elementFromPoint(t.clientX, t.clientY);
console.log(oElement);
document.getElementById("info").innerHTML = e.type + t.clientX + ':' + t.clientY + ' ' + oElement.innerHTML;
}, touchEnd : function(e){ //touchstart
console.log(e.type);
console.log(e);
console.log(this.movetarget);
t = this.movetarget.touches[0];
console.log(t.clientX + ':' + t.clientY);
document.getElementById("info").innerHTML = e.type + t.clientX + ':' + t.clientY ;
}, init : function(){
var content = document.getElementById("content"); content.addEventListener('touchstart', this.touchStart, false);
content.addEventListener('touchend', this.touchEnd, false);
content.addEventListener('touchmove', this.touchMove, false);
} } touch.init();
}
上一篇:Android刷新Dialog


下一篇:查出了a表,然后对a表进行自查询,a表的别名t1,t2如同两张表,因为t1,t2查询的条件不一样,真的如同两张表,关联两张表,可以将两行或者多行数据合并成一行,不必使用wm_concat()函数。为了将t2表的数据全部查出来使用了右连接。