JSF 2 / primefaces/ jquery : autoselect, autotab and highlight feature for input elements?
Just want to ask around before implementing own's solution using javascript and css. I wonder if in core jsf tags / primefaces / jquery have the following features :
- auto-select : When receiving 开发者_C百科focus, an input text would auto-select all of the texts, so that it could be replaced instantly by user input without having the user to delete the whole unselected/unblocked string.
- autotab : Would like to tab to the next input based on the tabindex defined when the value inputted has reached the limit of defined maxlength in the input text.
- highlight : Would like to have a different border or background when an element is focused
Thank you !
Regards, Albert Kam
for your first point this might works for you...
$("input[type=text]").focus(function(){
// Select field contents
this.select();
});
For second point this discussion might help you....
Auto Tab
For third point...
$("input[type=text]").focus(function(){
$(this).css("color","red");});
精彩评论