I have 3 radio buttons. 1. - when checked, should hide both divs 2. - when checked, should display div 2 (only) 3. - when checked, should display div 3 (only) I used function abox(state) { document.getElementById('abox').style.display = state; } Code (markup): But when using this, the prompter do not want to move to the 2nd text box, when I click into it, it goes to the first textbox. It is something like on click go to the first item.
set id property of text box input: <input type="text" id="abc" ..............> to set focus use document.getElementById("abc").focus();