1.設置窗口滾動條的位置:
window.scroll(0,document.body.scrollHeight)

例,在打開網頁時讓頁面處于頁面底端
<body   onload="window.scroll(0,document.body.scrollHeight)">

2.設置組件的滾動條的位置:

假設有個輸入框,id為TextArea1
方法一:
TextArea1.scrollTop=100;//滾動到輸入框的100位置
 方法二:
document.getElementById("TextArea1").scrollTop=document.getElementById("TextArea1").scrollHeight; //滾動到輸入框的底端

支持 IE 和 FF
onmouseover="this.style.cursor='pointer'"

------君臨天下,舍我其誰------