背景:
在easyui的下拉框中實(shí)現(xiàn)enter事件,首先要讓easyui的下拉框中的文本框聚焦,然后再添加回車事件,但是當(dāng)文本框聚焦時會有光標(biāo),給人造成一種假象,此時就可以用此方法隱藏光標(biāo)。
隱藏文本框光標(biāo)
方法:
$(".easyui-combobox").combobox({
onChange: function (n,o) {
$(this).textbox('textbox').focus();
$(this).textbox('textbox').css("caret-color","transparent");
}
});