Adding a ID to a <li> based on part of an <a> tag
- by mmsa
I have the following code:
<li class="zoneName"><a href="/Default.aspx?PageID=4869007">CYKF</a></li>
<li class="zoneName"><a href="/Default.aspx?PageID=4868459">YKA</a></li>
I need to add and ID to each of the < li tags in this list. I need that ID to be the number at the end of the href string. Below is what I'd like it to be
<li class="zoneName" id="4869007"><a href="/Default.aspx?PageID=4869007">CYKF</a></li>
<li class="zoneName" id="4868459"><a href="/Default.aspx?PageID=4868459">YKA</a></li>
Any help is appreciated.