HTML and PHP for creating dynamic web pages
i have already done the first four steps.
only last two steps left.
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
}
</style>
</head>
<center>
<body>
<table border="1" action="PreLab4.php" method="post">
<tr>
<td><p style="color:blue"><i>Which dessert would you like?</i></p>
<select id="mySelect" onchange="myFunction()" >
<option value="0">None
<option value="1">chocolate
<option value="2">icecream
<option value="3">fruit
<option value="4">brule
</select></td>
<td>
<img id="image" src="" width="300" height="200">
<script>
function myFunction( ) {
var x = document.getElementById("mySelect").value;
if (x < 1){
document.getElementById("image").src ="";
}else if (x < 2){
document.getElementById("image").src ="chocolate.jpg";
}else if (x < 3){
document.getElementById("image").src ="icecream.jpg"
}else if (x < 4){
document.getElementById("image").src ="fruit.jpg"
}else{
document.getElementById("image").src ="brule.jpg"}
}
</script>
</td>
</tr>
<tr>
<th colspan="2">
<p style="font-weight:normal">
<form style="text-align:left" >
Do you like writing exams?
<input type="radio" name="writingexam" value="Love"> Love
<input type="radio" name="writingexam" value="Like" checked> Like
<input type="radio" name="writingexam" value="Dislike"> Dislike
<input type="radio" name="writingexam" value="Despise"> Despise
</form>
</p>
</th>
</tr>
<tr>
<th colspan="2">
<form style="text-align:left">
First Name: <input type="text" name="firstname" required>
Last Name: <input type="text" name="lastname" required>
</th>
</tr>
<tr>
<th colspan="2" style="text-align:left" >
<input type="submit">
</form>
</th>
</tr>
</table>
</body>
</html>
</center>
11 years ago 10
- Scenario You work for a large financial institution that in the past ten years has developed new products and services that appeal to a very diverse customer base located throughout the world. You have been asked by your CEO to lead an effort to discuss t
- Microsoft Access One Assignment (2)
- Ashford University-POL201- American National Government:Week 2 Shorty Essay- Policy-making in the Federal System
- Accounting 557 Assignment 2: You Are an Investment Analyst
- The Etiology of Addiction
- Business Model and Strategic Plan Part I: Conceptualizing a New Product or Service Division of an Existing Business - BUS 475 Week 2 -
- what makes a writer? :)
- void
- payment link
- Adobe Illustrator cc 2014 assignmen