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

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -