<body>
<input type=button value=test onclick="this.disabled=true;fun();this.disabled=false;" >
</body><script>
function fun()
{
alert();}
</script>
<input type=button value=test onclick="this.disabled=true;fun();this.disabled=false;" >
</body><script>
function fun()
{
alert();}
</script>
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script language="JavaScript">
<!--
function clicks()
{
event.srcElement.disabled = true;
alert('do something');
event.srcElement.disabled = false;
}
//-->
</script>
</head><body>
<input type=button onclick="javascript:clicks()" value="clickme">
</body>
</html>