RemoveAttribute

Mar 6, 2005

The following code is not working:

<script>

function checkthis()
{
var c=document.getElementById("rm");
c.removeAttribute("href");
}
</script>

<body onload="checkthis()>
<a href="check()" id="rm>Test</a>
</body>

I tried to remove href attribute for anchor tag.

View 2 Replies


ADVERTISEMENT

Delete An Attribute Without Using The RemoveAttribute Property

Jan 11, 2011

I was wondering is there anyway to delete an attribute without using the removeAttribute property. So, for example: <li class=""> change to <li> Been researching for awhile and can not find anything about this.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved