|
ajax - Get value in field before submit
I want to got to page with AJAX and get the value that is in the field because i want to get the value and add my value also.
this is what i have so far:
$.ajax({
type: "POST",
url: "file.php",
async: false,
beforeSend: function(msg){
var i = $(msg).find('[name*=user]').attr('value');
console.log(i);
},
success: function(msg){
alert("sucess");
}
});
|