我想要一段 jQuery 来获取每个链接的VID
和MID
,然后写入每个EDIT
url。
<ul>
<li><a href="garage_modification.php?mode=view_modification&VID=6&MID=11" class="item">Induction Kit</a> - <a href="garage_vehicle.php?mode=edit_modification" class="edit">Edit</a></li>
<li><a href="garage_modification.php?mode=view_modification&VID=6&MID=12"class="item">Induction Kit</a> - <a href="garage_vehicle.php?mode=edit_modification" class="edit">Edit</a></li>
</ul
它基本上看起来像
<ul>
<li><a href="garage_modification.php?mode=view_modification&VID=6&MID=11" class="item">Induction Kit</a> - <a href="garage_vehicle.php?mode=edit_modification&VID=6&MID=11" class="edit">Edit</a></li>
<li><a href="garage_modification.php?mode=view_modification&VID=6&MID=12"class="item">Induction Kit</a> - <a href="garage_vehicle.php?mode=edit_modification&VID=6&MID=12" class="edit">Edit</a></li>
</ul>
生成的链接将是动态的,这就是我要使用 jQuery 的原因