Thuộc tính cuộn HTML DOM

定 nghĩa và cách sử dụng

Thuộc tính scrolling có thể thiết lập hoặc trả về xem iframe có thanh cuộn (chính sách cuộn) hay không.

Cú pháp

iframeObject.scrolling=auto|yes|no

Ví dụ

Dưới đây là ví dụ về việc thêm và xóa thanh cuộn của iframe:

<html>
<head>
<script type="text/javascript">
function addScrollbars()
  {
  document.getElementById("frame1").scrolling="yes";
  }
  function removeScrollbars()
  {
  document.getElementById("frame1").scrolling="no";
  }
</script>
</head>
<body>
<iframe src="frame_a.htm" id="frame1" ></iframe><br />
<input type="button" onclick="addScrollbars()" />
value="Add Scrollbars" />
<input type="button" onclick="removeScrollbars()" />
value="Remove Scrollbars" />
</body>
</html>