w3big
.com
Latest web development tutorials
☰
HTML
CSS
JAVASCRIPT
SQL
PHP
BOOTSTRAP
JQUERY
ANGULAR
XML
PYTHON
简体中文
繁體中文
日本语
한국어
ไทย
العربية
Português
Indonesia
Español
Italiano
Deutsch
Français
Pусский
polski
English
×
×
×
×
JavaScript & HTML DOM 參考手冊
概覽
JavaScript 對象
JavaScript Array 對象
JavaScript Boolean 對象
JavaScript Date 對象
JavaScript Math 對象
JavaScript Number 對象
JavaScript String 對象
JavaScript RegExp 對象
JavaScript 全局屬性/函數
JavaScript 運算符
Browser 對象
Window 對象
Navigator 對象
Screen 對象
History 對象
Location 對象
DOM 對象
HTML DOM Document 對象
HTML DOM 元素對象
HTML DOM 屬性對象
HTML DOM 事件對象
HTML 對象
<a>
<area>
<audio>
<base>
<blockquote>
<body>
<button>
<canvas>
<col>
<colgroup>
<datalist>
<del>
<details>
<dialog>
<embed>
<fieldset>
<form>
<iframe>
<frameset >
<img>
<ins>
<input> - button
<input> - checkbox
<input> - color
<input> - date
<input> - datetime
<input> - datetime-local
<input> - email
<input> - file
<input> - hidden
<input> - image
<input> - month
<input> - number
<input> - range
<input> - password
<input> - radio
<input> - reset
<input> - search
<input> - submit
<input> - text
<input> - time
<input> - url
<input> - week
<keygen>
<link>
<label>
<legend>
<li>
<map>
<menu>
<menuItem>
<meta>
<meter>
<object>
<ol>
<optgroup>
<option>
<param>
<progress>
<q>
<script>
<select>
<source>
<style>
<table>
<td>
<th>
<tr>
<textarea>
<title>
<time>
<track>
<video>
Window scrollBy() 方法
上一頁: Window scrollTo()方法
下一頁: Window resizeTo()方法
Window對象
定義和用法
scrollBy() 方法可把內容滾動指定的像素數。
注意:要使此方法工作window滾動條的可見屬性必須設置為true!
語法
scrollBy(
xnum,ynum
)
參數
描述
xnum
必需。 把文檔向右滾動的像素數。
ynum
必需。 把文檔向下滾動的像素數。
瀏覽器支持
所有主要瀏覽器都支持scrollBy() 方法
實例
實例
滾動100像素的內容:
function scrollWindow(){
window.scrollBy(100,100);
}
嘗試一下»
Window對象
上一頁: Window scrollTo()方法
下一頁: Window resizeTo()方法