I have a Javascript that is looping through a table's rows. One of table cells (TD) contains a date. Here's a sample:
<td class="ms-cellstyle ms-vb2"><span class="ms-noWrap" title="10/30/2015">10/30/2015</span></td>
Open in new window
I have a variable named "col_date" which needs contain just the date (10/30/2015).
var col_date = row.cells[suspense_date_column].innerHTML;
Open in new window
Right now col_date contains the whole
<span class="ms-noWrap" title="10/30/2015">10/30/2015</span>
Open in new window
. How can I return just the date without the span tag?
Thanks
Question: the HTML of the cell looks like a SharePoint generated table (at least the class names do :-))
Why dont you use jQuery?
Alternative solution:
Open in new window
HTH
Rainer