以chrome瀏覽器測試為準
scrollwidth scrollheight |
clientwidth clientheight |
offsetwidth offsetheight |
物件的實際寬高 包括了拖動滾動條才可視的部分 |
物件的當前可視寬高 不包括邊線,滾動條等 |
物件的當前可視寬高 包括邊線,滾動條等 |
scrolltop scrollleft |
clienttop clientleft |
offsettop offsetleft |
物件的可視左上角 與實際左上角的距離 |
物件的左上角邊線的寬高, 即可視左上角與邊線左上頂點的距離 |
物件的當前可視左上角 與瀏覽器文件視窗左上角的距離 |