本文介绍了onfocus()在IE中工作正常但在Firefox中没有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用onchange事件验证了一个文本字段,它会抛出错误信息,如果 不满足条件并将鼠标光标设置为使用 document.focus()的相同字段。 它在IE中工作正常,但在Firefox中使用时,鼠标光标移动到下一个文本字段。 请让我知道上述问题的可能解决方案。 问候和谢谢 Sourav
解决方案发布你的问题代码。
下面的函数验证一个只接受空格和字母的文本字段。 展开 | 选择 | Wrap | Line数字
也发布相应的HTML c颂。发布代码时请使用代码标签(请参阅如何提出问题) 。谢谢!
Hi, I have validate a text field with onchange event which throw error message, if not satisfied the condition and set the mouse cursor on the same field using document.focus(). It is working fine in IE, but when used in Firefox, the mouse cursor is moving to the next text field. Please let me know the possible solution for the above problem. Regards and Thanks Sourav
解决方案 Post your problem code.The below function validates a text field which only accepts space and letters. Expand|Select|Wrap|Line NumbersAlso post the corresponding HTML code. Please use code tags when posting code (See How to Ask a Question). Thanks!更多推荐
onfocus()在IE中工作正常但在Firefox中没有
发布评论