Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. $(document).ready(function(){
  2. $("button").click(function(){
  3. x = $("p").offset().left; // 表 p 標籤與document x 軸的距離(離左方)
  4. y = $("p").offset().top; // 表 p 標籤與document y 軸的距離(離上方)
  5. });
  6. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement