Jquery 常用用法

1.網頁禁止右鍵

 

 

 
$(document).ready(function(){

    $(document).bind("contextmenu",function(e){

        return false;

    });

}); 
 
<span style="font-size:18px;color:#ff0000;"><strong>2.獲取鼠標指針位置</strong></span>
 

 

$(document).ready(function() {

   $().mousemove(function(e){

    $('#aa').html("X Axis : " + e.pageX + " | Y Axis " + e.pageY);

  });
}); 
<DIV id="aa"></DIV>

 

 


 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章