Always set a type on $lt;button>s The default value is submit, meaning any button in a form can submit the form. Use type=”button” for anything that doesn’t submit the form and type=”submit” for those that do.$lt;button type=”submit”>Save changes$lt;/button>$lt;button type=”button”>Cancel$lt;/button> For actions that require a$lt;button> and are not in a form, use the type=”button”.
$lt;button class=”dismiss” type=”button”>x$lt;/button>