Code: Select all
<li onclick="remove(this)" style="cursor: pointer;">Code: Select all
<li><a href="javascript:remove(this)">x</a></li>Code: Select all
<a href="javascript:remove(this.parentNode)">x</a>Thanks.
Moderator: General Moderators
Code: Select all
<li onclick="remove(this)" style="cursor: pointer;">Code: Select all
<li><a href="javascript:remove(this)">x</a></li>Code: Select all
<a href="javascript:remove(this.parentNode)">x</a>ah, sweet. Why didn't I think of that before?pickle wrote:I don't think you can put Javascript like that in the href of a link. You could point the link to '#', and add an onclick() listener to the link. That'd behave just like a link normally would.