html列表中进行编辑操作
//编辑
$('._edit').click(function(){
var tr = $(this).parents('tr');
tr.find('._sort_box').hide();
tr.find('._sort_input_box').show().find('input').val(tr.find('._sort_box').html());;
tr.find('._edit_box').hide();
tr.find('._update_box').show();
});
//保存
$('._save').click(function(){
if(window.flagReq == true)return;
var plugin_id = $(this).prev('input[name=plugin_id]').val();
var tr = $(this).parents('tr');
var sort = tr.find('._sort_input_box').find('input').val();
var url = "<?php echo url('User', 'updateRemark');?>";
window.flagReq = true;
$.post(url, {openId:plugin_id,remark:sort}, function(result) {
result = eval('('+result+')');
jsAlert(result.msg,function(){
if(result.error == 0){
tr.find('._sort_box').show().html(sort);
tr.find('._sort_input_box').hide();
tr.find('._edit_box').show();
tr.find('._update_box').hide();
}
window.flagReq = false;
});
});
});
//取消
$('._cancel').click(function(){
var tr = $(this).parents('tr');
tr.find('._sort_box').show();
tr.find('._sort_input_box').hide()
tr.find('._edit_box').show();
tr.find('._update_box').hide();
});
C++中的初始化列表中可以对那些变量或对象进行初始化
构造函数与其函数体之间可以添加初始化列表,能对某些对象进行初始化.格式为 类名() : 变量1(参数1),变量2(参数2) { } 1. 父类的对象的构造必须在初始化列表中,如: 子类名(): ...
jQqery EasyUI dategrid行中多列数据的可编辑操作
最近的项目中需要在前台dategrid列表中直接修改某些列的数据,并且修改后的数据需要不通过后台而自动更新在列表中. 带着这一问题开始寻找实现的思路,首先想到的就是去jQqery EasyUI官网找例 ...
openerp模块收藏 移除下拉选择列表中的“创建并编辑”链接(转载)
移除下拉选择列表中的“创建并编辑”链接 原文:http://shine-it.net/index.php/topic,5990.0.html 有时希望下拉列表中列出的项是与主表某个字段关联的,用户只能 ...
JAVA中通过Jedis操作Redis连接与插入简单库
一.简述 JAVA中通过Jedis操作Redis连接与插入简单库 二.依赖