javascript change tag onclick code example Example: Change onClick attribute of html tag $("#id").attr("onclick","new_function_name()");