<script type="text/javascript">
$(function(){
$('.box').click(function(e){
// 獲取事件對象
var e = e||window.event;
// 獲得當前點擊位置距離瀏覽器頂部的距離
var top = e.pageY;
// 獲得當前點擊位置距離瀏覽器左側的距離
var left = e.pageX;
console.log(top+'|'+left)
})
})
</script>
</head>
<body>
<div class="box">
</div>
</body>
獲取瀏覽器寬高,
var widt = $(window).width();
var heigh = $(window).height();
獲取自己寬高
var boxW = $('.box').width();
var boxH = $('.box').height();