假设我在一个HTML页面中有几个DIV标签,例如:
<DIV ID="all">
<DIV ID="div1">
<Input type="radio" name="data['site1']['user']" VALUE="1">user1<br/>
</DIV>
<DIV ID="div2">
<Input type="radio" name="data['site1']['user']" VALUE="2">user2<br/>
</DIV>
<DIV ID="div3">
<Input type="radio" name="data['site1']['user']" VALUE="3">user3<br/>
</DIV>
<DIV ID="div4">
<Input type="radio" name="data['site1']['user']" VALUE="4">user4<br/>
</DIV>
</DIV>
能否使用JQuery实现与此类似的效果:
Document.getElementByID('div2').focus();