Tạo tiện ích LÊN, XUỐNG, TRỞ LẠI cho blog
Thứ Ba, 7 tháng 10, 2014
Cách tạo tiện ích: lên, xuống, tự động cuộn trang cho blog. Thủ thuật nhỏ này nhằm giúp cho người truy cập blog đỡ vất vả kéo chuột, nhất là khi truy cập bằng laptop với chuột ảo.Tiện ích này có thể tạo bằng cách sau:
- Chèn đoạn mã trong khung dưới đây vào bên dưới thẻ: ]]></b:skin> .
<!-- BAT DAU LEN XUONG -->
<style type='text/css'> #backscroll { width:30px; line-height:50px; position:fixed; right:5px; top:350px;
}
</style> <script language='javascript'> /* <![CDATA[ */ suspendcode="<div id='backscroll'><a onclick='javascript:amutop();return false;' href='#' title='LÊN ĐẦU'><img border=0 src=\"https://lh5.googleusercontent.com/-ObCGpcQDQDk/T35aQPPWQMI/AAAAAAAAAPA/8iDyiJ07n3Y/s48/top.gif\" width=\"30\"></a><br><a onclick='javascript:history.back();return false;' href='#' title='TRỞ LẠI TRANG VỪA XEM'><img border=0 src=\"https://lh4.googleusercontent.com/-HQASFJRYdd0/T35aO4vWfrI/AAAAAAAAAOo/WtpQMguYPLs/s48/back.gif\" width=\"30\"></a><br><a onclick='javascript:sc();return false;' href='#' title='DỪNG CUỘN'><img border=0 src=\"https://lh5.googleusercontent.com/-mZIfXp3qmSM/T35aP6jrhtI/AAAAAAAAAO0/Dda_pbetGyE/s48/ting.gif\" width=\"30\"></a><br><a onclick='javascript:clearInterval(timer);initialize();return false;' href='#' title='TỰ ĐỘNG CUỘN'><img border=0 src=\"https://lh4.googleusercontent.com/-HW6-lwAajuU/T35aO55KD8I/AAAAAAAAAOs/uWG9m072otc/s48/gun.gif\" width=\"30\"></a><br><a onclick='javascript:amubutton();return false;' href='#' title='XUỐNG CHÂN'><img border=0 src=\"https://lh4.googleusercontent.com/-i00crAzVJK0/T35aO5nmNdI/AAAAAAAAAOw/t0BCAeUQZbY/s48/end.gif\" width=\"30\"></a></div>" document.write(suspendcode);var currentpos,timer;function initialize(){timer=setInterval("scrollwindow ()",30)}function sc(){clearInterval(timer)}function scrollwindow(){currentpos=document.documentElement.scrollTop||document.body.scrollTop;window.scrollTo(0,++currentpos)}function amutop(){window.scrollTo(0,0);clearInterval(timer)}function amubutton(){window.scrollTo(0,8E4);clearInterval(timer)};/* ]]> */</script>
<!-- KET THUC LEN XUONG -->
- Bấm "Lưu mẫu" và trở lại trang chủ xem kết quả.
-
http://testxxxcode.blogspot.com/2014/10/tao-tien-ich-len-xuong-tro-lai-cho-blog.html
Zing cám ơn bạn đã quan tâm và rất vui vì bài viết đã đem lại thông tin hữu ích cho bạn.
All comments [ 0 ]
Your comments