fkjj.net
ǰλãҳ >> jquEry sCrolltop ΪʲôûЧ >>

jquEry sCrolltop ΪʲôûЧ

취 ԪΪɼ״̬el.style.display='block'Ϳԭel.scrollTopԻjQueryscrollTopˡ

ԭ html˸߶ʱȡ$(window).scrollTop(),$(document).scrollTop()ȡֵΪ0 취 ֵ $(document).ready(function() { $(window).scroll(function(e){ var juantop=$(document).scrollTop() alert(juantop)...

ɡ ҪbodyĹ¼ $(function(){ var min_height = 100; $(window).scroll(function() { //ȡڵĹĴֱλ var s = $(window).scrollTop(); //ڵĹĴֱλôҳС߶ʱ...

ֻquirkģʽ£ body.scrollTopDZжֵ֧ Ҳ ҲûбҪȥǣ ֻҪסһ if(window.pageYOffset){//һȥ˴󲿷֣ ֻIE678 }else if(document.documentElement.scrollTop ){//IE678 ķquirkģʽ }...

scrollTopjqueryеúõʱҪjqueryڿ⣻Ȼ÷ $(document).ready(function(){ $(".btn1").click(function(){ $("div").scrollTop(100); }); $(".btn2").click(function(){ alert($("div").scrollTop()+" px"...

var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;

ԭ html˸߶ʱȡ$(window).scrollTop(),$(document).scrollTop()ȡֵΪ0 취 ֵ $(document).ready(function() { $(window).scroll(function(e){ var juantop=$(document).scrollTop() alert(juantop)...

window.onbeforeunload= function () { return "رҳ"; //رҳʱĵ } window.onscroll= function () { alert("ҳ"); } window.onresize= function () { alert("ҳСı"); } window.onmousewheel= function () { aler...

checkbox 1 2 3 4 ------------------------------------------------------------- $(document).ready(function() { $("td[id^='k_']").hide(); var check = $(":checkbox"); //õбѡеcheckbox var actor_config; // check....

jQueryȡط jquery ȡ߶ ȡʾĸ߶ $(window).height(); ȡʾĿ $(window).width(); ȡҳĵ߶ $(document).height(); ȡҳĵ $(document).width(); ...

վҳ | վͼ
All rights reserved Powered by www.fkjj.net
copyright ©right 2010-2021
磬ַϵͷzhit325@qq.com