<!DOCTYPE html>
<html>
<head>
<style>
#myDIV {
width: 300px;
height: 300px;
background: lightblue url('smiley.gif') no-repeat;
color: white;
overflow: auto;
}
</style>
</head>
<body>
<h1>Change background-attachment with JavaScript</h1>
<p>Click the radio buttons and scroll the DIV element to see the effect of the background-attachment property:</p>
<form name="myForm">
<input type="radio" name="myAtt" value="fixed" onclick="myFunction()" checked>fixed
<input type="radio" name="myAtt" value="local" onclick="myFunction()">local
</form>
<div id="myDIV">
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>
<h1>Hello</h1>