javascript - Saving input data from JQuery form -
i'm trying user enter email id text-box, can store database.
here's barebones html corresponding jquery code can examined in basic functionality. i'm still learning js might have picked code here , there.
problem: email id isn't being displayed on screen.
<form id="signup-form"> <div class="form-group"> <input type="text" class="form-control" name="email" id="email" placeholder="get informed when it's online!"/> <button id="signup-button" class="btn btn-default">count me in!</button> </div> </form>
jquery:
$("#signup-form").ready(function() { $("#signup-button").click(function() { alert($('#email').val()); }); });
don't know i'm doing wrong. help.
use document
$(document).ready(function() { $("#signup-button").click(function() { alert($('#email').val()); }); });
Comments
Post a Comment