Not sure why that would be failing. I do the same thing at work on a regular basis, and it works regardless of the formfield being hidden or not.
Perhaps try this:
<input type="hidden" value="236434" id="ixd" name='ixd' />
<script>
console.log($("#xid").val())
</script>
That will get you the value of the hidden field. To get the value out of a form field, the .val()
method needs to be used.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…