javascript - How to get the span id which starts with a word -
actually have 2 span ids date_eform
, time_eform
.
now have these ids.. , check if span
id starts date_
have perform logic. , if span
id starts time_
action.
<span id='date_eform'></span><span id='time_eform'></span>
please me in this.
you need starts selector
so
$.each('span[id^="date_"]',function(){ //your code here });
and
$.each('span[id^="time_"]',function(){ //your code here });
Comments
Post a Comment