HTML and CSS Reference
In-Depth Information
<script type="text/javascript">
var range;
var rvalue;
function init(){
range = document.getElementById("range");
rvalue = document.getElementById("rvalue");
rvalue.placeholder = "10 is most urgent";
range.onchange = update;
function update(){
rvalue.value = range.value;
window.onload = init;
Note Remember that in a production environment you would want to move your
script to an external file because this provides a better organizational separation of your
markup and script.
A new fieldset is created for “Communication Preferences” regarding the tip. A check
box is provided for indicating whether the user may be contacted. If so, then another
fieldset is nested inside of the first, where two radio buttons allow the user to choose
their preferred contact method. By default “Email” is selected (with the checked at-
<legend>Communication Preferences</legend>
<p><label>May we contact you about this tip? <input
type="checkbox" /></label></p>
<legend>Preferred contact method:</legend>
name="contactpref" /></label></p>
Search WWH ::

Custom Search