我在带有输入滑块的iphone模拟器中尝试了这个但是它不起作用
http://vikku.info/codesnippets/javascript/find-absolute-position-of-an-html-element/
function findAbsolutePosition(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
do {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
} while (obj = obj.offsetParent);
}
return [curleft,curtop];
//returns an array
}
那么webkit的代码是什么?