<input id="elA" value="element A"> <div id="elB">element B</div> <script> (function () { elA.focus(); elB.onclick = function () { elA.focus(); }; }()); </script>
<input id="elA" value="element A"> <label for="elA"> <div id="elB">element B</div> </label>