Właściwości przewijania DOM HTML
Definicja i użycie
Atrybut scrolling można ustawić lub zwrócić, czy iframe ma paski przewijania (strategię przewijania).
Gramatyka
iframeObject.scrolling=auto|yes|no
Przykład
Poniższy przykład pokazuje, jak można dodać i usunąć paski przewijania w 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>