close
通常
傳入參數是
function test(obj){
a=obj.style.pixelLeft
b=obj.style.pixelTop
}
*obj是網頁上的物件
但是
我認為比較好懂的方法是
function test(objID){
var obj = document.getElementById(objID);
a=obj.style.pixelLeft
b=obj.style.pixelTop
}
全站熱搜