单击复选框时如何更改焦点 [英] how to change Focus when checkbox is clicked
本文介绍了单击复选框时如何更改焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的要求是...
我有包含复选框的复选框列和包含水果名称的水果列....当我按下复选框时,焦点必须移到水果列
例如:复选框水果
当我单击复选框时,焦点必须移至水果列
my requirement is ...
i have check box column which contain checkboxes and fruits column which contain fruit names....when i press checkbox the focus must move to the fruits column
ex.. checkbox fruits
when i click at check box focus have to move to fruits column
推荐答案
选中的更改事件
on checked change event
checkboxFruites.focus();
在这种情况下,您可以使用JavaScript.查找该组件的ID并设置焦点.
You can use JavaScript in that case. Find ID of that component and set focus.
document.getElementByID("<%=txtBox1.ClientID%>").focus();
并在复选框的onblur事件中应用此功能.
and apply this function in onblur event of checkbox.
这篇关于单击复选框时如何更改焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文