easyui-textbox 文本框
<input class="easyui-textbox" data-options="iconCls:'icon-search'" id="a" style="width:300px">
// 取值:
$("#a").textbox('getValue')
// 赋值:
$("#a").textbox('setValue','new value')
easyui-datebox 日期框
<input id="dd" type="text" class="easyui-datebox" required="required">
// 设置值
$('#dd').datebox('setValue', '6/1/2012');
$('#dd').datebox('setValue', '2022-7-25');
// 获取值
var v = $('#dd').datebox('getValue');
easyui-datetimebox 日期时间框
<input class="easyui-datetimebox w200" data-options="panelWidth:250, buttons:'', panelHeight:290" id="beginTime" name="beginTime" />
// 取值:
$("#a").datetimebox ('getValue')
// 赋值:
$("#asss").datetimebox ('setValue','2022-07-25 14:10:00')
easyui-validatebox 校验框
// easyui-validatebox 赋值
$("#START_PERCENT_S1").val("111111");
easyui-numberbox 数字框
<input type="text" class="easyui-numberbox" value="100" id='a' data-options="min:0,precision:2">
// easyui-numberbox 设置值
$('#a').numberbox('setValue','1111');
// 获取值
$('#a').numberbox('getValue');
easyui-validatebox easyui-numberbox 一块用时,赋值要赋两次
<input type="text" class="easyui-validatebox easyui-numberbox" id="aaa" data-options="required:true,precision:2"/>
// easyui-validatebox 赋值
$("#aaa").val(''值");
// easyui-numberbox 赋值
$('#aaa').numberbox('setValue',"值");
easyui-combobox 下拉框
$('#cc').combobox({
url:'combobox_data.json',
multiple:true, //支持多选
valueField:'id',
textField:'text'
});
easyui-combobox
单选
// 默认选中(单选下拉框)
$('#a').combobox('select','键值');
select 与 setValue 一样
// 设置键值
$("#a").combobox('setValue','1');
// 设置文本框中的值
$("#a").combobox('setText','北京');
// 获取combobox 的键
$("#a").combobox('getValue');
获取combobox 选中的值
$("#a").combobox('getText')
getValue和getText区别:
getValue:获取的是value对应的值
getText:获取的是文本值
获取combobox中下拉框的所有数据 数组
$("#a").combobox('getData');
多选
multiple=“true”
设置值
var group = "001,002,003"
$('#cc').combobox('setValues',group.split(","));
获取值
$('#comboboxlist').combobox('getValues'); // 获取选中的所有值 ,获取的值为数组
传参用:
$('#comboboxlist').combobox('getValues').toString();
easyui-linkbutton
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="buttonClick()">关闭按钮</a>
第一种方法:
$(selector).linkbutton({disabled:true}); // 禁用
$(selector).linkbutton({disabled:false});// 启用
第二种方法:
$(selector).linkbutton('disable'); // 禁用
$(selector).linkbutton('enable'); // 启用