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
Deepak Awashti
NA
301
74.2k
Explain Full Code
Dec 7 2015 5:11 AM
$(function () {
$("#btnSave").bind("click", function () {
var Name;
Name = $("#txtname").val();
var Age = $("#txtage").val();
var Address = $("#txtaddress").val();
var Email_id = $("#txtemail").val();
var Pswd = $("#txtpswd").val();
$.ajax({
type: "POST",
url: "Default.aspx/SaveUser",
data: "{Name: ' " + Name + " ',Age:'" + Age + "',Address:'" + Address + "',Email_id:'" + Email_id + "',Pswd:'" + Pswd + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data)
{
var obj = data.d;
if (obj == 'Save')
{
var str = "<tr><td>" + Name + "</td><td>" + Age + "</td><td>" + Address + "</td><td>" + Email_id + "</td><td>" + Pswd + "</td></tr>";
$('#tb1').append(str);
}
alert("User has been added successfully.");
//window.location.reload();
}
});
return false;
pls xplain in all line , why are used in all linesin jquery
Reply
Answers (
2
)
javascript Problem
how to write a simple program in sharepoint using jquery