for html you need to define ID name of an element
<input type="button" name="clickme1" id="clickme1" value="Click me !!" onclick="JavaScript:showbutton('clickme2')"><BR> <input type="button" name="clickme2" id="clickme2" value="Click me !!" onclick="JavaScript:showbutton('clickme1')" style="visibility:hidden">For javascript need this code
function showbutton(idName){ Element = document.getElementById('clickme2'); Element.disabled=true; Element.style.visibility = "hidden"; Element = document.getElementById('clickme1'); Element.disabled=true; Element.style.visibility = "hidden"; clickme1Element = document.getElementById(idName); clickme1Element.disabled=false; clickme1Element.style.visibility = "visible"; }