Dynamic event handler attribute

by Bacher

HTML

<button>A</button>

JavaScript

$('button').attr('onclick', 'alert(3);');