Attribute for <BUTTON ...>
NAME = "text string"
NAME sets the name of the button element. If the button is a submit button
then the name and the
value should be
sent to the server. Unfortunately MSIE did not properly implement this feature so
NAME is of limited value.
NAME can also be used in scripts. The button can be refered to by using its
name as a property of the form. For example, the following code creates a button
named go that has blinking text:
<FORM ACTION="../cgi-bin/mycgi.pl"
METHOD=POST
NAME="myform">
email: <INPUT NAME="email">
<BUTTON NAME="go" TYPE="submit"><STRONG>Go!</STRONG></BUTTON>
</FORM>
<SCRIPT TYPE="text/javascript">
<!--
function blinker()
{
if (document.forms.myform.go.style.color == 'blue')
document.forms.myform.go.style.color='red';
else
document.forms.myform.go.style.color='blue';
setTimeout('blinker()',500);
}
blinker()
//-->
</SCRIPT>
which gives us