jQuery¼¼Êõ

jQuery λÖú¯ÊýʵÀý½Ì³Ì

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2017-05-10 08:00 ÎÒÒªÆÀÂÛ( )

PHPText.NetÒ»¸ö¹ØÓÚΧÈÆPHP¶àÄêµÄÍøÕ¾£¬¼¼Êõ£¬Éú»î

PHPText.Net > ÎÄÕ > ¼¼Êõ > WEB¿ª·¢

jQuery λÖú¯ÊýʵÀý½Ì³Ì

2017/05/05 23:58
6ÈËÔĶÁ
jQuery λÖú¯ÊýʵÀý½Ì³ÌÏêϸ³ö´¦²Î¿¼£ºhttp: www jb51 net article 22685 htm<!DOCTYPE html PUBLIC "- W3C DTD XHTML 1 0 Transitional EN" "http: www w3 org TR xhtml1 DTD xhtml1-transition

jQuery λÖú¯ÊýʵÀý½Ì³Ì
Ïêϸ³ö´¦²Î¿¼£º.net½Ì³Ì/article/22685.htm">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" >
<head>
<title>jQueryµÄλÖú¯Êý(offset(),innerWidth(),innerHeight(),outerWidth(),outerHeight(),scrollTop(),scrollLeft())СӦÓÃ</title>
<style type="text/css½Ì³Ì">
#divShow{width:100px;height:50px;background-color:Green;display:none;}
#divAd{width:100px;height:100px;background-color:Red;position:absolute;top:100px;left:100px;}
</style>
<script type="text/javascript½Ì³Ì" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
//ÔÚÎı¾¿òÏ·½ÏÔʾһ¸ödiv£¬ÀàËÆÈÕÀú¿Ø¼þÄÇÑù¡£
function showDiv(obj){
jQuery("#divShow").css("left",jQuery(obj).offset().left);
jQuery("#divShow").css("top",jQuery(obj).offset().top + jQuery(obj).outerHeight());
jQuery("#divShow").show();
}
jQuery(function(){
});
//¹ö¶¯Ìõ¹ö¶¯£¬Ö´ÐÐÏÂÃæµÄº¯Êý£¬ÊʺÏ×ö¸¡¶¯¹ã¸æ
jQuery(this).scroll(function(){
jQuery("#divAd").css("top",100 + jQuery(document).scrollTop());
jQuery("#divAd").css("left",100 + jQuery(document).scrollLeft());
});
</script>
</head>
<body>
<input type="text" value="ok" onclick="showDiv(this);" />
<div id="divShow">2010-03-22</div>
<div id="divAd">¸¡¶¯¹ã¸æ</div>
<div style="height:2000px;width:2000px;">ÓÃÀ´³Å³ö¹ö¶¯Ìõ</div>
</body>
</html>

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • PHP+jQueryʵÏÖ¹öÆÁÎÞˢж¯Ì¬¼ÓÔØÊý¾Ý¹¦ÄÜÏê½â

    PHP+jQueryʵÏÖ¹öÆÁÎÞˢж¯Ì¬¼ÓÔØÊý¾Ý¹¦ÄÜÏê½â

    2017-05-09 16:02

  • PHP+jqueryʵʱÏÔʾÍøÕ¾ÔÚÏßÈËÊýµÄ·½·¨

    PHP+jqueryʵʱÏÔʾÍøÕ¾ÔÚÏßÈËÊýµÄ·½·¨

    2017-05-05 18:00

  • Laravel 5 ÖлùÓÚ jQuery ʵÏֲַ㼶µÄÀàÄ¿Ê÷½á¹¹ÊµÀý½Ì³Ì Larav

    Laravel 5 ÖлùÓÚ jQuery ʵÏֲַ㼶µÄÀàÄ¿Ê÷½á¹¹ÊµÀý½Ì³Ì Larav

    2017-04-27 08:01

  • isoÖÐSafariÖÐʹÓÃjQueryµÄbind click ʼþʧЧ½â¾ö°ì·¨

    isoÖÐSafariÖÐʹÓÃjQueryµÄbind click ʼþʧЧ½â¾ö°ì·¨

    2017-04-24 12:04

ÍøÓѵãÆÀ
¸