Hello,
I have a <input type="hidden" value="" id='h_v' class='h_v'> Using jQuery I want to alert the user to this value .
I am using
var hv = $('#h_v).text();
alert('x');
But its not working, any clues!
Thanks Jean
Hello,
I have a <input type="hidden" value="" id='h_v' class='h_v'> Using jQuery I want to alert the user to this value .
I am using
var hv = $('#h_v).text();
alert('x');
But its not working, any clues!
Thanks Jean
Use val() instead of text()
var hv = $('#h_v').val();
alert(hv);
You had these problems:
text() for an input fieldx rather than variable hv