How to get multiple text values in alert using jquery

Posted by Manideepgoud under jQuery category on | Points: 40 | Views : 2626
Hi every one,

In this code am gonna explain how to get the multiple text values in alert using html and jquery.

Lets get in to html part
<!DOCTYPE html>
<script src=""></script>
<p>Login and Register form</p>
<form id="getingValues">
<input type="text" name="Name"></br>
<input type="text" name="Age"></br>
<input type="text" name="Gender"></br>
<input type="password" name="password"></br></br>
<input type="button" value="Login" id="loginbtn">
<input type="button" value="Register" id="Registerbtn">

In the above code, i have defined the text with Name, Age, Gender and Login and Register buttons.
My aim is to get the text values in the alert by clicking Login and Register Button .
In order to get the alert, we need to add small jquery function.

In the above function we have defined the
to the html and we have given the id for login and register.
When the Login button is clicked the id triggers and gives the alert values of the form i.e which we are calling with

Comments or Responses

Posted by: Baba12 on: 8/23/2018 Level:Starter | Status: [Member] | Points: 10

Login to post response