这听起来非常简单,但我没有运气光标。我尝试了很多方法,但这是我目前所处的位置。如果需要,我可以提供更多信息。
{
this.getMinute().addListener('spinup', this.SpinnerUp, this); //getMinute is the spinner field
}
...
timeSpinnerUp: function (field, e) {
el=this.getMinute().getEl(); // el.selection is not an option
}
答案 0 :(得分:0)
HTMLInputElement.select()和/或HTMLInputElement.setSelectionRange()可以帮助你吗?
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange