jquery获取某组件距离边框的距离
2021-06-04 16:01
标签:height 效果 inf alt img ack OLE absolute top 效果: jquery获取某组件距离边框的距离 标签:height 效果 inf alt img ack OLE absolute top 原文地址:https://www.cnblogs.com/1998xujinren/p/12340998.htmlDOCTYPE html>
html>
head>
meta charset="utf-8"/>
title>jquery获取组件距离边界的距离title>
script src="../jquery.js">script>
head>
body>
div id="div01" style="width:200px;height:200px; position:absolute; left:400px; top:100px; background-color:blue">div>
body>
script>
var left1 = $("#div01").offset().left;
var top1 = $("#div01").offset().top;
console.info("left :" + left1);
console.info("top :" + top1);
script>
html>
文章标题:jquery获取某组件距离边框的距离
文章链接:http://soscw.com/index.php/essay/90457.html