My goal to retrieve value from javascript and SHOW IN INPUT. I am able to view it on span BUT NOT input .
Below are my codes. Help will be appreciate! :)
<SCRIPT type="text/javascript">
function GetSelectedItem()
{
var e = document.getElementById("staff");
var strSel = e.options[e.selectedIndex].value;
alert(strSel);
$('#inputId').text(strSel);
}
</SCRIPT>
<input id="inputId">