我會在前言中說我是一個總共jquery新手。不過,我想使用jQuery插入帶有進下面的代碼位的<a>
標籤「太極拳」的值的「相對」屬性...使用jquery在<a>標籤中插入'rel'屬性標籤
<div class="bibImage" title="">
<a href="" target="_parent"><img src="" border="0" alt=""></a>
</div>
這是系統生成的HTML ,所以我沒有添加'class'或'id'屬性的選項,這有助於jquery定位元素。 div是唯一標識的,所以我猜測可以將<a>
指定爲孩子(?);但我真的不知道如何。我也不明白哪種方法可以用來實際插入'rel'屬性+值。
在此先感謝您的任何見解和指導。
輝煌 - 這並獲得成功;正是我需要的。非常感謝! – Doug