I have a basic form, and wanted to change the contents of the div after clicking on the submit form, when I run without the submit works, put with the submit does not work
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><script>$(document).ready(function(){$("#btnenviar").click(function(e){
$("#formenvio").submit();
$("#frame2").load("quiz.html");
e.preventDefault();
});
});
</script>
</head>
<body>
<div id="frame2">
<form id="formenvio" class="form-horizontal" >
<fieldset>
<legend>Form Name</legend>
<div class="form-group">
<label class="col-md-4 control-label" for="textinput">Text Input</label>
<div class="col-md-4">
<input id="textinput" name="textinput" type="text" placeholder="placeholder" class="form-control input-md">
<span class="help-block">help</span>
</div>
</div>
<!-- Button -->
<div class="form-group">
<label class="col-md-4 control-label" for="singlebutton">Single Button</label>
<div class="col-md-4">
<button id="btnenviar" name="singlebutton" class="btn btn-primary">Button</button>
</div>
</div>
</fieldset>
</form>
</div>
</body>
</html>