TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
rahul patil
NA
160
8.6k
How to displaying user filled form data using javascript?
May 13 2020 8:29 AM
I want to displaying filled form data using javascript
I m working on single page application concept.
signup.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset=
"utf-8"
/>
<script src=
"https://code.jquery.com/jquery-3.4.1.min.js"
></script>
<script src=
"signup.js"
></script>
</head>
<body>
<form id=
"txtPersonalInformation"
>
<h1>Personal Information</h1>
First Name:<input id=
"txtfname"
type=
"text"
/><br />
Middle Name:<input id=
"txtmname"
type=
"text"
/><br />
Last Name:<input id=
"txtlname"
type=
"text"
/><br />
<input id=
"btnnext"
type=
"button"
value=
"Next"
/>
</form>
</body>
</html>
signup.js
//next button click event
$(document).ready(function () {
$(
'#btnnext'
).click(function (event) {
$(
"#txtPersonalInformation"
).load(
"ContactInformation.html #txtContactInformation"
);
});
});
ContactInformation.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset=
"utf-8"
/>
<script src=
"https://code.jquery.com/jquery-3.4.1.min.js"
></script>
<script src=
"ContactInformation.js"
></script>
</head>
<body>
<form id=
"txtContactInformation"
>
<h1>Contact Information</h1>
Email Id:<input id=
"txtemailid"
type=
"text"
/><br />
Password:<input id=
"txtpass"
type=
"password"
/><br />
Contact No:<input id=
"txtcontactno"
type=
"number"
/><br />
<input id=
"btnsubmit"
type=
"button"
value=
"Submit"
/>
</form>
</body>
</html>
ContactInformation.js
$(document).ready(function () {
$(
'#btnsubmit'
).click(function (
event
) {
debugger
$(
"#txtContactInformation"
).load(
"/signup.html #txtPersonalInformation"
);
//HERE I want to display the PersonalInformation filled form detail
$(
"#txtContactInformation"
).load(
"/ContactInformation.html #txtContactInformation"
);
//HERE I m trying to display the ContactInformation filled form detail
});
});
when user filled the form data and i want to display there data?
Reply
Answers (
3
)
The registration no format issue.
how can i change the value of textbox using function?