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