HTML and CSS Reference
In-Depth Information
Code
Explanation
clearInterval(tid);
If so, stop motion
}
Close if true clause
drawall();
Draw everything
Close change function
}
</script>
Close script element
</head>
Close head element
<body onLoad="init();">
Open body and set call to init
<canvas id="canvas" width=
"600" height="400">
Define canvas
Your browser doesn't support
the HTML5 element canvas.
Warning to users of non-compliant browsers
</canvas>
Close canvas
<br/>
Line break
<form name="f" id="f"
onSubmit="return fire();">
Starting form tag, with name and id. This sets up call to
fire .
Set velocities and fire
cannonball. <br/>
Label and line break
Horizontal displacement <input name=
"hv" id="hv" value="10" type=
"number" min="-100" max="100" />
Label and specification of input field
<br>
Line break
Initial vertical displacement <input
name="vv" id="vv" value="-25"
type="number" min="-100" max="100"/>
Label and specification of input field
<input type="submit" value="FIRE"/>
Submit input element
</form>
Close form element
Search WWH ::




Custom Search