javascript - Hiding a button onClick="" before launching the following method calls -
i not familiar inline js. have button such
<button onclick="return dosomething()"></button>
how hide & disable button before return , dosomething called? (jquery available too).
i need button hidden & disabled before onclick methods called.
you can this:
<button onclick="this.disabled = true;this.style.display = 'none';return dosomething()"></button>
or in dosomething function:
<button onclick="return dosomething(this)"></button> function dosomething(obj){ obj.disabled = true; obj.style.display = 'none' // other stuff }
Comments
Post a Comment