I'm very new to jQuery. I've been trying to use the .serialize method in jQuery, but I can not seem to garner a response. I've checked console on Microsoft Edge, Internet Explorer, and Chrome but there's no indication of anything happening past connecting to the latest library (3.4.1). My HTML and JavaScript code are below:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><!DOCTYPE HTML><html><head><meta charset="utf-8"/><title></title><script language="JavaScript" type="text/javascirpt" src="https://code.jquery.com/jquery-3.4.1.js"></script></head><body><form name="ourform" id="ourform" action=''><select name="salute"><option>Mr.</option><option>Mrs.</option></select><br>
First Name: <input type="text" name="firstname"/>
Last Name: <input type="text" name="lastname"/><br><select name="region" multiple="multiple"><option>North</option><option>South</option><option>East</option><option>West</option></select><br><textarea rows="6" cols="20" name="comment"></textarea><input type="submit" name="g" value="submit" id="g"/></form><div class="results">Your Results</div><script language="JavaScript" type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.js">
$(document).ready(function(){
$('#ourform').submit(function(event){
event.preventDefault();
var myform = $('#ourform').serialize();
alert(myform);
return false;
});
});</script></body></html>
Any help you could provide would be greatly appreciated.