alert(document.getElementById('innerNice').getBoundingClientRect().left);/*alert是对话框*/
alert(document.getElementById('innerNice').getBoundingClientRect().top);/*用对话框显示我们需要的值,初学者最适合的方法*/
/*document.getElementById('innerNice')是获取id对应的组件如:<span id="innerNice" style="color: #FF0004">什么吗</span>*/
/*得到组件(span)后通过getBoundingClientRect()可以点出需要的值*/
/*left 左 top 顶 等等*/