我让aI需要通过.onblur验证输入,这样每当文本输入失去焦点时,它就会由相同的JS函数进行验证。
我的问题是JS函数。我想要获取失去焦点的项目的价值。
function valid(){
if (isNaN("this should be the value of the text item??")){
}
谢谢..。
在用户从当前焦点控件点击选项卡键后,我需要在按钮上设置焦点。请注意,在当前焦点控件和所需按钮之间还有其他动态控件,我不希望焦点移走。
控制安排如下:
<dynamic drop down control 1>
<dynamic drop down control 2>
<dynamic drop down control 3 (Focus is currently here)>
<dynamic drop down control 4>
<dynamic drop down control 5>
...
...
<dynamic
我有一个angular.js应用程序,它应该在执行某些事情时将焦点设置为特定的元素(即,将焦点设置为无效的表单字段,以让用户更正错误)。
我试图在角e2e测试中测试这种行为:
it('should set the focus to the invalid field', function() {
input('email').enter('foo'); // this is not a valid email address
element(/* submit button */).click(); // try to submit th
我有一个文本字段,当它失去焦点时应该隐藏起来。我还有一个按钮。问题是,当您单击按钮时,文本字段首先失去焦点,这会移动按钮,阻止它接收单击事件。
HTML:
<div>
<p> Focus on the text field, and then click the button </p>
<div id="hideMeOnFocusOut">
<input type="text" id="focusMeOut" autofocus>
<br