类型:GET, 数据:{id:obj.value}, contentType:'application / json', cache:false, dataType:'json', 成功:函数(数据){ if(data!= null){ var date = new Date(parseInt(data.DateOfBirth.replace(/ Date(,))。 replace()/,),10)); var DateOfBirth =(0+(date.getDate()+ 1))。slice(-2)+ - +(0+(date.getMonth()+ 1))。slice(-2)+ - + date.getFullYear(); bootbox.dialog({ 消息:'<script> $(".pager").click(function (evt) { var pageindex = $(evt.target).data("pagerindex"); $("#CurrentPageIndex").val(pageindex); evt.preventDefault(); $("#SearchData").val(localStorage.searchterm); $("form").submit(); }); $("#searchterm").click(function () { localStorage.searchterm = $("#SearchData").val(); }); $("#search").click(function () { localStorage.searchtext = $("#Search_Data").val(); }); $(".paging").click(function (evt) { var pageindex = $(evt.target).data("pageindex"); $("#PresentPage").val(pageindex); evt.preventDefault(); $("#Search_Data").val(localStorage.searchtext); $("form").submit(); }); if (localStorage.token == null || localStorage.token == undefined) document.location = "/Account/Login"; $("#tab1").addClass("active"); $('#tabPatientLead').addClass("active"); $("#tab1").click(function () { localStorage.tab = "tab1"; }); $("#tab2").click(function () { localStorage.tab = "tab2"; }); $("#search").click(function () { localStorage.tab = "tab2"; }); if (localStorage.tab == "tab2") { $("#tab2").addClass("active"); $('#tabActivePatients').addClass("active"); $("#tab1").removeClass("active"); $('#tabPatientLead').removeClass("active"); } function patientdetails(obj) { $.ajax({ url: "/Patient/patientinfo", type: "GET", data: { id: obj.value }, contentType: 'application/json', cache: false, dataType: 'json', success: function (data) { if (data != null) { var date = new Date(parseInt(data.DateOfBirth.replace("/Date(", "").replace(")/", ""), 10)); var DateOfBirth = ("0" + (date.getDate() + 1)).slice(-2) + "-" + ("0" + (date.getMonth() + 1)).slice(-2) + "-" + date.getFullYear(); bootbox.dialog({ message: '< form class =form-水平id =详情role =形式>' // +'<form class="form-horizontal" id="details" role="form">' //+ '' +'< label class =col-sm-2 control -label>名字:< / label>' +'' + ' <label class="col-sm-2 control-label">First Name:</label>' + '' +'<输入type =textclass =form-controlid =FirstNamevalue ='+ data.FirstName +'>' +'' + ' <input type="text" class="form-control" id="FirstName" value="' + data.FirstName + '">' + '' // +' ' //+ '' +'' + '' +'< label class = col-sm-2 control-label>姓氏:< / label>' +'' + ' <label class="col-sm-2 control-label">Last Name:</label>' + '' +'< input type =textclass =form-controlid =LastNamevalue ='+ data.LastName +'>' +'' + ' <input type="text" class="form-control" id="LastName" value="' + data.LastName + '" >' + '' +'' + '' // +'' //+ '' +' < label class =col-sm-2 control-label>出生日期:< / label>' +'' + ' <label class="col-sm-2 control-label">Date-Of-Birth:</label>' + '' +'< input type =textclass =form-controlid =DateOfBirthvalue ='+ DateOfBirth +' >' +'' + ' <input type="text" class="form-control" id="DateOfBirth" value="' + DateOfBirth + '">' + '' // +'' //+'' +'' + '' +'< label class =col-sm-2 control-label>手机号码:< / label>' +'' + ' <label class="col-sm-2 control-label">Mobile Number:</label>' + '' +'< input type =textclass =form-controlid =MobileNumbervalue ='+ data.MobilePhone + '\">' + '' + ' <input type="text" class="form-control" id="MobileNumber" value="' + data.MobilePhone + '">' + '' + '' + '' //+ '' //+ '' + ' <label class=\"col-sm-2 control-label\">Home Phone:</label>' + '' + ' <label class="col-sm-2 control-label">Home Phone:</label>' + '' + ' <input type=\"text\" clas s=\"form-control\" id=\"HomePhone\" value=\"’ + data.HomePhone + ’\">’ + ’' + ' <input type="text" class="form-control" id="HomePhone" value="' + data.HomePhone + '">' + '’ //+ ’' //+ '’ + ’' + '’ + ’ <label class=\"col-sm-2 control-label\">Email:</label>’ + ’' + ' <label class="col-sm-2 control-label">Email:</label>' + '’ + ’ <input type=\"text\" class=\"form-control\" id=\"Email\" value=\"’ + data.Email + ’\">’ + ’' + ' <input type="text" class="form-control" id="Email" value="' + data.Email + '">' + '’ + ’' + '’ //+ ’' //+ '’ + ’ <label class=\"col-sm-2 control-label\">City:</label>’ + ’' + ' <label class="col-sm-2 control-label">City:</label>' + '’ + ’ <input type=\"text\" class=\"form-control\" id=\"City\" value=\"’ + data.City + ’\">’ + ’' + ' <input type="text" class="form-control" id="City" value="' + data.City + '">' + '’ //+ ’' //+ '’ + ’' + '’ + ’ <label class=\"col-sm-2 control-label\">State:</label>’ + ’' + ' <label class="col-sm-2 control-label">State:</label>' + '’ + ’ <input type=\"text\" class=\"form-control\" id=\"State\" value=\"’ + data.State + ’\">’ + ’' + ' <input type="text" class="form-control" id="State" value="' + data.State + '">' + '’ + ’' + '’ //+ ’' //+ '’ + ’ <label class=\"col-sm-2 control-label\">Zip Code:</label>’ + ’' + ' <label class="col-sm-2 control-label">Zip Code:</label>' + '’ + ’ <input type=\"text\" class=\"form-control\" id=\"ZipCode\" value=\"’ + data.ZipCode + ’\">’ + ’' + ' <input type="text" class="form-control" id="ZipCode" value="' + data.ZipCode + '">' + '’ //+ ’' //+ '’ + ’' + '’ + ’ <label class=\"col-sm-2 control-label\">Occupation:</label>’ + ’' + ' <label class="col-sm-2 control-label">Occupation:</label>' + '’ + ’ <input type=\"text\" class=\"form-control\" id=\"Occupation\" value=\"’ + data.Occupation + ’\">’ + ’' + ' <input type="text" class="form-control" id="Occupation" value="' + data.Occupation + '">' + '’ + ’' + '’ + ’</form>’ + ’\t\t\t' + '</form>' + '’ + ’\t\t' + '’ + ’\t' + '’, title: ’Details’, }); } } }); } </script> Thanks and Regards Ramesh', title: 'Details', }); } } }); }</script>Thanks and RegardsRamesh推荐答案(\".pager\").click(function (evt) { var pageindex =(".pager").click(function (evt) { var pageindex =(evt.target).data(\"pagerindex\");(evt.target).data("pagerindex");(\"#CurrentPageIndex\").val(pageindex); evt.preventDefault();("#CurrentPageIndex").val(pageindex); evt.preventDefault(); 这篇关于使用mvc4中的jquery实现自定义paginginfo类的分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-14 09:34