标签:.post one UNC data upd click update cti ram
<tr id="{$v.id}">
<td class="name"><span>iphonCX</span></td>
$("span").dblclick(function(){
var txt=$(this).text();
$(this).parent().html("<input type=‘text‘ value=‘"+txt+"‘class=‘xg‘/>");
});
var yuan="";
$(document).on("blur",".xg",function(){
var val=$(this).val();
var id=$(this).parent().parent().attr("id");
var obj=$(this);
$.post(
"{:url(‘index/upd‘)}",
{
val:val,
id:id
},
function(data){
if(data==1){
obj.parent().html("<span>"+val+"</span>");
alert("修改成功");
}else{
alert("修改失败,网络错误");
obj.parent().html("<span>"+yuan+"</span>");
return false;
$id=Request::instance()->param("id");
$val=Request::instance()->param("val");
$res=Db::table("wu")->where("id",$id)->update([‘name‘=>$val]);
if($res){
echo json_encode(1);
}else{
return 0;
clone find attr
标签:.post one UNC data upd click update cti ram
原文地址:https://www.cnblogs.com/gwhm/p/10223680.html