HTML and CSS Reference
In-Depth Information
Code
Explanation
</form>
</body>
</html>
I chose to put the modest change of the style information in the first application. Table 3-4 shows the third
bouncing ball application, with form validation. Again, I have only commented the new code, but I include
all the code for completeness sake.
Table 3-4. The Third Bouncing Ball Application, with Form Validation
Code
Explanation
<html>
<head>
<title>Bouncing Ball with inputs</title>
<style>
form {
width:330px;
margin:20px;
background-color:brown;
padding:20px;
}
input:valid {background:green;}
Set up feedback for valid input
input:invalid {background:red;}
Set up feedback for invalid input
</style>
<script type="text/javascript">
 
Search WWH ::




Custom Search