javascript prevent defauly code example Example: js preventdefault function(event) { event.preventDefault(); }