i have web site input value bar code reader. need keep input field focus until gets value. used <input onblur="this.focus()"> , variations using functions, won't work. i'd prefer not using jquery, it's not mandatory.
what want might fine in specific use case, please don't if isn't really, absolutely necessary. annoying, if users can't control focus anymore. having said that, this:
<input onblur="if (this.value == '') { var field = this; settimeout(function() { field.focus(); }, 0); }" type="text"> you should put in separate function.
Comments
Post a Comment