<script>
$(function(){$("#dlg_form").submit(function(){
var postStr = "name="+$("#kbrealname").val()+"&sex="+$("#sex").val()+"&phone="+$("#phone").val()+"&crowd="+$("#crowd").val()+"&card_type="+$("#card_type").val()+"&card_number="+$("#card_number").val()+"&year="+$("#year").val()+"&month="+$("#month").val()+"&day="+$("#day").val();
$.ajax({
type: "POST",
contentType: "application/x-www-form-urlencoded",
url: "ryajax.PHP",
data: postStr,
error: function(){
alert( '您所请求的页面有异常,请刷新重试。' );
},
success: function(msg){
if(msg=="" ){
return false;
}
else{
$( "#ryadd").html(msg);
$(".cusedit").css("display","none");
}
}
});
});
});
</script>
<form id="dlg_form" method="post" onSubmit="return false;"> <div class="editcuscircle"> <p><a class="closebtn" href="javascript:;"></a></p> <div> <label for="kbrealname">真实姓名:</label> <input type="text" placeholder="管理员真实姓名" id="kbrealname" name="name" value=""><b>请填写真实姓名,以免影响您入住</b> </div> <div class="cussex"> <label>性别:</label> <ul class="sex"> <li><span data-val="1" ></span>男</li> <li><span data-val="0"></span>女</li> <input type="hidden" value="" name="sex" id="sex" /> </ul> </div> <div class="longnum"> <label>手机号码:</label> <input type="text" placeholder="手机号" name="phone" id="phone" value="<?PHP echo $singdata['phone']; ?>" /> </div> <div> <label>类型:</label> <select name="crowd" id="crowd"> <?PHP foreach ($crowd as $k => $v){ echo '<option value="'.$v['id'].'">'.$v['name'].'</option>'; } ?> </select> </div> <div> <label>证件:</label> <select name="card_type" id="card_type"> <?PHP foreach ($card_type as $k => $v){ echo '<option value="'.$v['id'].'">'.$v['name'].'</option>'; } ?> </select> </div> <div class="longnum" > <label>证件号码:</label> <input type="text" placeholder="证件号码" name="card_number" id="card_number" value="<?PHP echo $singdata['card_number']; ?>" /> </div> <div> <label for="">出生年月:</label> <select class="sel_year" style="width:100px; overflow:hidden;" id="year" name="year" rel=""></select>年 <select class="sel_month" style="width:100px;overflow:hidden;" id="month" name="month" rel=""></select>月 <select class="sel_day" style="width:100px;overflow:hidden;" name="day" id="day" rel=""></select>日 </div> <input type="submit" class="save" name="sub" value="保存" /> </div> </form> </div> <script> $(function () { $.ms_DatePicker({ YearSelector: ".sel_year",MonthSelector: ".sel_month",DaySelector: ".sel_day" }); $.ms_DatePicker(); $(".deleteall").click(function(){ $("#dels").submit(); }); }); </script>