html - jquery get the value using class name -


i trying value of input text field based on class name through jquery.

the html is:

<form>   <input type="text" id="datepicker" style="display: none;">   <div class="dp_wrapper dp_input_6">     <div class="dp_tagbox">       <span class="dp_tag dp_tag_day">11</span>       <span class="dp_tag dp_tag_month">jun</span>       <span class="dp_tag dp_tag_year">2009</span>       <input type="text">     </div>   </div>   <input type="button" onclick="getcontents()" value="submit"> </form> 

the jquery is:

var myvalue=$('.dp_tag dp_tag_day').val() 

but myvalue coming undefined. know why?

var days_as_nums = parseint($('.dp_tag_day', '.dp_input_6').text(), 10); 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -