i have the html as follows
<div class="element-container" id="div_3">
<div id="submit_submit" class="element">
<div class="fleft">
<input type="submit" value="Click me!" name="submit" id="submit"/>
</div>
<div class="clr"/>
</div>
</div>
When i click on element-container i want the label of submit button i.e. Click me!
Please give a solution , I’ve tried $('#submit').attr('value'). but i didn’t get the result
There’s a built-in method in jQuery for returning the value of
INPUTelements,val(). The following should work:I’ve never tried it with a submit button specifically though.