Switch to full style
JQuery Examples
Post a reply

Get values of Form parameters using JQuery

Mon Jan 07, 2013 8:54 pm

Get values of Form parameters using JQuery, Get Input fields content
php code
<html>
<head>
<title>Get values of Form parameters using JQuery</title>

<!--
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
Note you can download the JQuery package instead of using Google version. -->
<script src="jquery-1.8.3.js"></script>
<style type="text/css">
body
{
background:#FF66FF;
font-size:11px;
}

</style>

<script>
$(document).ready(function(){
$("input#sbtButton").click(function(){
$('div#div1').html("You have entered the following values:");
$('div#div1').append( "<br/>"+$('[name=username]').val());
$('div#div1').append( "<br/>"+$('[name=password]').val());
$('div#div1').append( "<br/>"+$('[name=password2]').val());
$('div#div1').append( "<br/>"+$('[name=email]').val());

});
});
</script>

</head>
<body>
<form action="#" method="post">
<b>Username:</b><input type="text" name="username" size="50" /><br/>
<b>Password:</b><input type="password" size="50" name="password" /><br/>
<b>Confirm Password:</b><input type="password" size="50" name="password2" /><br/>
<b>Email:</b><input type="email" size="100" name="email" /><br/>
<b>Gender:</b>
<select name="gender">
<option></option>
<option>Male</option>
<option>Female</option>
</select>
<input type="submit" value="submit" id="sbtButton" />
</form>

<div id="div1"></div>
</body>
</html>


To POST parameters using JQuery Please read this :
jquery-examples/post-parameters-using-jquery-t10686.html



Post a reply
  Related Posts  to : Get values of Form parameters using JQuery
 Post parameters using JQuery     -  
 get url, title and url sent parameters with JQuery     -  
 get HTML elements attributes values using JQuery     -  
 Clear specific form fields using JQuery     -  
 php login form (sign-in form)     -  
 Reference Parameters     -  
 modulus of two values     -  
 Encoding parameters in URL     -  
 How can i Get Brightness and Contrast values of img     -  
 Calculate the sum of values in an array     -