Change Button Text On MouseOver

[Total: 0    Average: 0/5]

This randomly picks a string to use and places that string on the form button.

Body Code:

<form name=exf1>
<input type=button name=b1 value="first value" onmouseover="changeme()">
</form>
<script type=text/javascript>
var _a = new Array("First Value","Second Value","Third Value");
function changeme() {
  document.exf1.b1.value = _a[parseInt(Math.random()*3)];
}
</script>

Times Viewed: 1

Leave a Reply

Your email address will not be published. Required fields are marked *