<script>
   function getAbsLeft(e){
     var l=e.offsetLeft; 
     while(e=e.offsetParent)  l += e.offsetLeft; 
     return l;
   }
   function getAbsTop(e) {
     var t=e.offsetTop;  
     while(e=e.offsetParent)  t += e.offsetTop;  
     return t;
   }
  function f(tt){
    alert( "文本矿的位置:"+ getAbsLeft(tt)+":"+getAbsTop(tt))
  }
</script>
    <input type="text" name="textfield" onClick="f(this);">