<html>
<body>
<form id="myForm">
<table>
<tr>
<td>
<input id="myButton"
type="button"
onClick="alert('This element value is:\n'+this.value);">
</td>
<td>
<input id="myReset"
type="reset"
onClick="alert('This element value is:\n'+this.value);">
</td>
<td>
<input id="mySubmit"
type="submit"
onClick="alert('This element value is:\n'+this.value);">
</td>
</tr>
</table>
</form>
<script language="JavaScript">
document.getElementById("myButton").value = 'input type = "button"';
document.getElementById("myReset").value='input type = "reset"';
document.getElementById("mySubmit").value='input type = "submit"';
</script>
</body>
</html>
|