Button Overview

[Total: 0    Average: 0/5]

Syntax:

Body Code:

<form name=exf1>
<input type=text name=t1><BR>
<input type=button value="Do Command" name=b1 onClick="doIt()">
</form>
<script type=text/javascript>
var _state=1;
function doIt() {
if (_state==1) {
document.exf1.t1.value="You set it";
} else {
document.exf1.t1.value="";
}
_state = _state?0:1;
}
</script>

Times Viewed: 0

Leave a Reply

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