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> 

http://jsfiddle.net/ye87k/


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -