I have a series of input
elements each with a few <div>
tags separate.
I like to have if where I can click
on any of the <div>
and it will focus
on an input
.
Is this possible and if so can anyone give ideas on script?
Click on to focus <input>
2020-02-26 04:05发布
2020-02-26 04:05发布
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
Try this with jquery:
USING HTML ("for") :
HTML provides this functionality. Using "for" "id" you can easily achieve it.
Try this :
I don't see a reason why you need
JS
to do this when such feature is already provided inHTML
.LIVE DEMO