<html>
<form name="orderForm">
<input type="checkbox"
name="V6">V6<br>
<input type="checkbox"
name="V8">V8<hr>
Step 2:
<input type="button"
value="Submit Order"
name="orderButton"
onClick="submitOrder()">
</form>
<script language="JavaScript">
<!--
function submitOrder()
{
var alertString = String("You have selected a ");
if(document.orderForm.V6.checked == true)
alertString += document.orderForm.V6.name;
else
alertString += document.orderForm.V8.name;
alertString += " truck.";
alert(alertString);
}
-->
</script>
</html>
|