I开发者_运维问答f I have an HTML input field like this one:
<input type="text" id="mytextfield"/>
all browsers seem to show the caret (insertion point) in the field. Is is possible to prevent this from appearing by applying some CSS or javascript?
(My reason for asking is that my input is the basis of a GWT-Ext combo box like the ones on http://www.gwt-ext.com/demo/#linkedComboBox - you can't type in it, but you can still see the caret, which is annoying).
What you could try is disable the input element and explicitly set its color to black:
<input type="text" disabled="disabled" style="color: black;" ... />
This should work for the GWT-Ext combo box (at least it did when setting the attributes in firebug).
精彩评论