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