id (image,txt,canvas,タブ付iframe)のドラッグとタッチ移動  (Ver.14)  
ttt1
ttt2
ttt3
ttt4
t0,  t1,  t2,  t3
t4,  t5,  t6, 
 ( MSPointer / Mouse / Android の 自動切替 )

  注意 : HTML IE 9 以降から表示。  pointer
dragOnつかむ石(タッチ & マウス共用) −-- 注意:スクロールとめておく (body style="overflow:hidden") 、Androidは縦オーバー避ける
タッチタブレットで青色に変わるのは、 マウスの img src="b.gif" onMousedown="aa()"とonTouchstart="aa()"がだぶっているとき。
マウス用
window.document.onmousedown = Mdown; window.document.onmousemove = Mmove; window.document.onmouseup = Mup;
タッチ用
window.document.ontouchmove = tmove; window.document.ontouchend = toff;
マウス用 --- タッチ用 の比較
event.X (down時の座標) --- event.touch[0].pageX (onTouchstart時/IEではevent.pageXなし)
event.clientX (move時の座標) --- event.touch[0].pageX
event.offsetX (picture pointの位置) --- なしのためxx,yy計算する。
IE10-eventX,clientX,touch[0].pageXほぼ同じ。注:IE11では実数に変更、Chromeは整数。マウスの操作について
id属性でオブジェクト名を指定
document.all['id'].style.left = X座標[かぎ括弧]+"px"
document.all('id').style.left = X座標(括弧)+"px"
cf:document.images[n].style.left --- 数字n
座標取得(px付きからpx抜き)  x0=eval((document.all['id'].style.left).slice(0,-2))


参照番号(ページ先頭からの画像数)でオブジェクト名を指定 / かぎ括弧
document.images[0].style.left = X座標
画像名でオブジェクト名を指定
document.images["namezokusei"].style.left = X座標
name属性でオブジェクト名を指定
document.namezokusei.style.left = X座標

getElementById('id')とかgetElementByName('name')とかgetElementByTagName('name') / かっこ 、form不要