Answers for "input hidden selected"

0

input hidden selected

<form>
    <select id="dropdown" name="dropdown" onchange="changeHiddenInput(this)">
        <option value="j.hotmail.com">Jens</option>
        <option value="a.hotmail.com">Adam</option>
        <option value="d.homtail.com">Dan</option>
    </select>
    <input type="hidden" name="hiddenInput" id="hiddenInput" value="" />
 </form>

    function changeHiddenInput (objDropDown)
    {
        var objHidden = document.getElementById("hiddenInput");
        objHidden.value = objDropDown.value; 
    }
Posted by: Guest on October-19-2020

Browse Popular Code Answers by Language