Skip Navigation LinksHome > Blog > 2008 > March > 14 > Javascript: Change the OnClick function

Javascript: Change the OnClick function

After battling with this for days, I finally figured out how to change the OnClick function for an a HTML anchor tag. This method is compatible with browsers as well as IE.

a.onclick = new Function() {

}