HTML and CSS Reference
In-Depth Information
Code
Explanation
<form name="f" id="f" onSubmit=
"return change();">
Start of form. Give name and id (may need for some
browsers). Set up action on submit button.
Horizontal velocity <input name="hv"
id="hv" value="4" type="number"
min="-10" max="10" />
Label an input field for horizontal velocity
<br>
Line break
Vertical velocity <input name=
"vv" id="vv" value="8" type="number"
min="-10" max="10"/>
Label an input field for vertical velocity
<input type="submit" value="CHANGE"/>
Submit button
Close form
</form>
</body>
Close body
</html>
Close html
The application that uses an image as the ball and the gradient-filled walls is very similar. Table 3-3 shows
all the codeā€”but I just comment the code that is different. Im not being lazy; the idea is to let you see how
each application is built on the previous one.
Table 3-3. The Second Application, with an Image as the Ball and Gradient-Filled Walls
Code
Explanation
<html>
<head>
<title>Bouncing Ball with inputs</title>
<style>
form {
width:330px;
margin:20px;
 
Search WWH ::




Custom Search