Công cụ có các nhiều chức năng giúp người đọc dễ dàng thao tác trên blog của bạn. Đặc biệt là những blog viết lách, tài liệu. Để thêm widget này bạn thực hiện theo bước sau:
Vào Bố cục > Thêm tiện ích > HTML/Javascript dán đoạn code sau vào khung nội dung và lưu lại. Ở bài này Khánh có giới thiệu 2 mẫu cho bạn lựa chọn. bạn có thể sử dụng 1 trong 2 đọan code sau:
Mẫu 1
<style type="text/css">
#backscroll {width:30px;line-height:50px;position:fixed;left:5px;top:200px;}
</style>
<script language="javascript">
suspendcode="<div id='backscroll'>
<a onclick='javascript:amutop();return false;' href='#' title='TOP'><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPp9DiehI7bAEhKu67ry9n8ix4Q1bLoVk2ytH1y5Tr0ynu-JJWQSdEM3BJGqQAGE_I-r4DG8zzYjQ-Q4FrnW1Dml-HycuAg9R-vkFzp5Q7omVWmvD2gPTPyrX1W50w_3-hfWCIfFarZ9ZQ/s0/\" width=\"30\"></a><br><a onclick='javascript:history.back();return false;' href='#' title='BACK'><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguNsqbGbCccuOwYyuK6J5JPKZo0dIaYATPl3yF3DEYtu15KeH9PogkJZGn2aYP_2uSoYYag8r1hdx4bIghhpIEi9LgC40y0-HdgepLCY0lEAOxk6CmeoqYUDcvSD5HYcqjOv435mjts4Rf/s0/\" width=\"30\"></a><br><a onclick='javascript:sc();return false;' href='#' title='STOP'><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzPtle035XMtyYUl_CVAVoLgyErSXLsri34H_tpaJ9E-nHh5XM29jMYdVeY5Lw6OCVmhdaaEzrX1xi8rHL38cS6_Pegbsefv6Nt3K2gJ7jb06RYAIwcRIGad0jZLtLAENhRGkjTa7ClA0T/s0/\" width=\"30\"></a><br><a onclick='javascript:clearInterval(timer);initialize();return false;' href='#' title='DOWN'><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJUbOQNGpF9lcpZbxctmQKeP_rGrUS-M6E2YT37EQDd6eqLnOQeHvqngJrk3fxETWfbht3MKHZrhUckX5Bg3iP_alFhUN3AYsqqqRZ1VFZ0LwuNIL2SgrAovlB8HczVn953DxVaQE64ot9/s0/\" width=\"30\"></a><br><a onclick='javascript:amubutton();return false;' href='#' title='BOTTOM'><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8gsaG61YYv-13V0H6-J50j91beLsAA-tcZCAvlTUCejZQjuZMWxFVIPpxfaaUV5_B3M9ELGdDq3nQIzuVJddYrS8Cx-E4KoFY7hjZ7v5whJst1wygyiGKGaALnkbsOa_UykwwhnnhvKq0/s0/\" 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>
Mẫu 2
<style type="text/css">
#backscroll {width:30px;line-height:50px;position:fixed;left:5px;top:200px;}
</style>
<script language="javascript">
suspendcode="<div id='backscroll'>
<a onclick='javascript:amutop();return false;' href='#' title='TOP'><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRlidn0GqP4Mzkt-5s1kgHPIWby65G_sXgGKuZJAtXeGc-kKqbjzZ90T61PG-lA0JfGfhturNMTwl5mKGy-NkCQX5V2P8e-MJFhOHV1EUmdeHjHbTXJpAh45eyk7Wzau9rddinyIXdXXl-/s1600/top-blogduykhanh.gif\" width=\"30\"></a><br><a onclick='javascript:history.back();return false;' href='#' title='BACK'><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkiQIGK3PrNsW7ec0AbrpuQDh_E1CGJssZsodbrRbvB5wop8C3P7z3NYp0_h4nJqQM94cBt4gHkQvX70kmaI2q8jBxpERHN_8BB_BPCYBnC-itALieof_YpKXcPMxjDLBF7ecZeYl9egDH/s1600/back-blogduykhanh.gif\" width=\"30\"></a><br><a onclick='javascript:sc();return false;' href='#' title='STOP'><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhysK-vIuWVj-X5kwLVlf_2t9f8lO8ud2cCIANGbWQzVmAIeuNdTnPRGtZ_eztZYaj7ODvXdNsmhz2zG-bnbBXbTJ-R1nL9YUrTLWAP3jEqzB80GCg4dWzkITK7wV-cZe99Av4UT7uzYdLx/s1600/pause-blogduykhanh.gif\" width=\"30\"></a><br><a onclick='javascript:clearInterval(timer);initialize();return false;' href='#' title='DOWN'><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ8vyz2FX_wK-xvDcP5UP-5xYf8a8YKcUQz2PlnR-3xOvH6wNh9i_6X4cHw6Csulc5CMB923Ly85Spxqhn5oLRTHl2LQ3LweG1OLi-6FbQaWS07Wf7ni_q8FZwzvIwpYeqTWtwhmenn66B/s1600/gun-blogduykhanh.gif\" width=\"30\"></a><br><a onclick='javascript:amubutton();return false;' href='#' title='BOTTOM'><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieXjNuBm-SsC8KJqn7eCNFiV_4ACG6ALavU464hlHZfdlM_2WxEj3HVkc2deBTvGzWTdh-9hAi1qS7CKMQOqU46gi14tIj_lTZp4Q623PqK0TweQO2j2k7j4jKS_pLTHKnoKK-BSsGEBGr/s1600/bottom-blogduykhanh.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>
Trong đó bạn có thể đổi left thành right nếu muốn widget hiện ở bên phải blog. top:200px là khoản cách widget với trên cùng blog, bạn cũng có thể thay đổi nó. Chúc thành công!
Mặt cườiMặt cười