$(".btn1").click(function(){
$("div").scrollTop(100);
});
$(selector).scrollTop(offset)
$("div").scrollTop(100);
});
$(selector).scrollTop(offset)
var login_css = document.createElement('link');
login_css.id = 'login_css';
login_css.rel = 'stylesheet';
login_css.type = 'text/css';
login_css.media = 'screen';
login_css.href = css_url;
document.body.appendChild(login_css);
login_css.id = 'login_css';
login_css.rel = 'stylesheet';
login_css.type = 'text/css';
login_css.media = 'screen';
login_css.href = css_url;
document.body.appendChild(login_css);
// add div element
var divE = document.createElement('div');
divE.id = 'login_container';
divE.style.visibility = 'hidden';
divE.style.opacity = 0;
var login_HTML = "";
var divE = document.createElement('div');
divE.id = 'login_container';
divE.style.visibility = 'hidden';
divE.style.opacity = 0;
var login_HTML = "";
var d = document.documentElement || document.body;
var scrollTop = d.scrollTop > d.offsetTop ? d.scrollTop : d.offsetTop;
divE.style.top = scrollTop+220+'px';
document.body.appendChild(divE);
var scrollTop = d.scrollTop > d.offsetTop ? d.scrollTop : d.offsetTop;
divE.style.top = scrollTop+220+'px';
document.body.appendChild(divE);
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/3172/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表