JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script src="http://www.jeasyui.com/easyui/datagrid-groupview.js"></script>
<link rel="stylesheet" href="http://www.jeasyui.com/easyui/themes/icon.css">
<link rel="stylesheet" href="http://www.jeasyui.com/easyui/themes/metro-gray/easyui.css">
<input
id="PROGRAM_NAME"
class="easyui-textbox"
style="width:300px;height:24px;"
data-options="
editable: false,
prompt: 'Program Name',
iconWidth: 22,
icons: [{
iconCls:'icon-add',
handler: function(e){
alert('add');
}},{
iconCls:'icon-edit',
handler: function(e){
alert('edit');
}
}]
">
<br/> <br/>
<input
class="easyui-textbox"
id="PROGRAM_NAME_2"
data-options="
buttonIcon:'icon-edit',
prompt:'Program Name',
onClickButton:function(){
alert('edit');
},
editable: false"
style="width:300px;height:24px;
">
<br/> <br/>
<button onCLick="disableEdit()">Disable Edit</button>
JavaScript
function disableEdit(){
console.log($('#PROGRAM_NAME').textbox('options'));
console.log($('#PROGRAM_NAME_2').textbox('options'));
$('#PROGRAM_NAME').textbox({icons:[{
iconCls:'icon-add',
handler: function(e){
alert('add');
}},
]});
}