正文
easyui dialog 按钮动态命名
小程序:扫一扫查出行
【扫一扫了解最新限行尾号】
复制小程序
【扫一扫了解最新限行尾号】
复制小程序
1.方法一:
/**
* grid新增
* 弹框并且获取支付类型
*/
function gridAdd() {
var dlg = $('#mydialog').dialog({
title : "缴纳保证金",
buttons : [ {
id : "flagBttOne",
text : "缴纳保证金",
handler : function() {
confirmSubmit2();
}
}, {
id : "flagBttTwo",
text : "保存用户信息并缴纳保证金",
handler : function() {
confirmSubmit2();
}
}, {
text : "关闭",
handler : function() {
dlg.dialog('close');
}
} ]
}); $('#mydialog').dialog('open'); // 打开窗口
}
对按钮添加id属性,操作id属性。
$('#flagBttOne').hide();
$('#flagBttTwo').show();
2.直接对id属性进行赋值操作
document.getElementById('myform').text()=""
但是这个做法存在,一个问题
一.鼠标放下去,会有下划线
二.字的位置不在方框的中间
3.定义一个公共变量,判断之后,进行赋值