I was messing around with forms, and I was working with a JSfiddle, and I couldn't get the page to return an alert.
Here is my HTML:
<form>
<input type="text" id="first"></input>
<input type="text" id="last"></input>
<input type="button" value="Submit" onClick="construct()"></input>
</form>
Here is my JavaScript:
function construct() {
var firstName = document.getElementById("first").value;
var lastName = document.getElementById("last").value;
alert("Welcome to the party " + firstName + " " + lastName + "!");
}
And I can't tell why it is not returning a value. Any help is appreciated! Oh and here is the fiddle: http://jsfiddle.net/nickpalmer789/4DJ4e/1/ Thanks!
