Serialize form data using jQuery helps in getting form element data easy.
function getFormData(form) {
var rawJson = form.serializeArray();
var model = {};
$.map(rawJson, function (n, i) {
model[n['name']] = n['value'];
});
return model;
}
Now use model object to get your form elements value. like model.name