How do I change function after clicking buttons in JavaScript? -
if have 3 functions a(),b(),c()
<input type="button" value="text" id="button" onclick="a()"></input> what should write in function a() make into
<input type="button" value="text" id="button" onclick="b()"></input> after click button.
change attribute after click:
<input type="button" value="text" id="button" onclick="b();this.setattribute('onclick','a()')"></input>
Comments
Post a Comment