i have an anchor tag as below.
<a style="border:0px" href='javascript:deleteAttachment(this);' />
Inside the deleteAttachment, how can i get the anchor tag. Sending this to the method, sends the window element to the method.
function deleteAttachment(ancElement){
//Jquery operation on acnElement
}
Please helop me out.
Use the
onclickhandler:or, the cleanest and most accepted method nowadays, have just the raw link in the HTML:
and add the click event programmatically, in a separate script block, on DOM load: