- 浏览: 35100 次
- 性别:
最新评论
文章列表
$('input[id*="resId"]').each(function(){
$(this).combobox({ onSelect:function(rec){ var v1=$(this).combobox('getValue');
var id=$(this).attr("id") $('input[id*="resId"]').not($(this)).each(function(){ var v2=$(this).combobox('getValue'); ...
select case u.sex when 1 then "man" when 2 then "woman" ELSE "unknow" END AS sex from user u
jsp 页面引入easyui 和kindeditor 文件
kindeditor 文件:
<link rel="stylesheet" href="../resources/kindeditor/themes/default/default.css" /><link rel="stylesheet" href="../resources/kindeditor/plugins/code/prettify.css" /><scr ...
function addText() { ----------添加 var records = $('#grid2).datagrid("getSelections"); for(var i=0;i<records.length;){ $('#grid1').datagrid('appendRow',records[i]); $('#grid2').datagrid('getData').total++; $('#grid2).datagrid("deleteRow",$("#grid2").datagrid(&quo ...
easyui combobox 级联选择
- 博客分类:
- easyui
<td>国家:</td> <td> <input class="easyui-combobox" name="country" data-options="editable:false,panelHeight:200,valueField:'id',textField:'name',url:'/countryList.action‘,loadFilter:function(data){if(data.success)return data.result.rows;},onSele ...
ps -aux ---------------------查看所有进程
ps -ef|grep java---------------------------查看java进程
find -name "*tomcat*" -----------------查找文件
locate *.log-----------查找文件
tail -f system.log -----------------实时查看更新日志
touch ---------------新建文件
mkdir--------------新建目录
at--------------------定 ...
模态窗口页面取母页面对象
- 博客分类:
- jquery
例如:
取母页面输入框id为 name的值:parent.$("#name").val();
取母页面js定义的变量name:parent.name
js代码:
var validTypeName="remote['/game/validate.action?id=2','name']";
$("#name").validatebox({
validType : validTypeName
});
后台返回 true 或 false
$('#searchForm').form("submit", { url : WINDOW_CONTEXT_PATH+'/data/roleList.action', dataType:'json', success : function(data) { var result = $.parseJSON(data); if (result.success) { var columns=new Array(); var cls=result.rows.columns; for(var i=0;i<cls.len ...
sql 为:
添加concat 函数解决查询输入框输入特殊字符报错的问题,例如单引号
name like concat('%',#{name},'%')
用onshowpanel 事件,页面和js 不要加url属性;url属性事件触发时赋值。
onShowPanel : function(){ var s=$(this).combobox('getData') if(s.length==0){ $(this).combobox('options').url= "/game/gameList.action?operateStatusId=1"; $(this).combobox('reload'); } },
代码:
$('.validatebox-text').validatebox('disableValidation');
$('.validatebox-text').focus(function () { $(this).validatebox('enableValidation'); });
$('.validatebox-text').blur(function () { $(this).validatebox('validate') });
$('.button-white').click(function () {----------表单提交时启用校验
$('.validat ...
必须包含三种字符正则表达式
- 博客分类:
- 正则表达式
正则表达式为:
/^(?![0-9]+$)(?![a-zA-Z]+$)(?![@\-_\.]+$)(?![A-Za-z0-9]{6,}$)(?![A-Za-z@\-_\.]{6,}$)(?![0-9@\-_\.]{6,}$)[A-Za-z0-9@\-_\.]{6,}$/
jquery 代码:
无需点击下拉三角区域,点击输入框即显示下拉面板
$("body").on("click",'.combo-text',function(){
$(this).siblings("span").find("span").click();
});
$(".easyui-combobox").combobox({
loadFilter:function(data){
var obj = eval(data);
var value=$(this).combobox('options').valueField;
var text=$(this).combobox('options').textField;
var str = new Object()
str[''+value+'']="";
str[''+text+'']="全部";
obj.uns ...