'clearAttributes()' Example : clearAttributes « Node Operation « JavaScript DHTML






'clearAttributes()' Example

    
<html>
<body>
<script language="JavaScript">
    function function1() {
        document.all.myP.clearAttributes(); 
    } 
</script>
<p id="myP" style="color:red">This text has the style and id attributes.</p>
<button onclick="function1();">Clear attributes()</button>
</body>
</html>

    
      
      








Related examples in the same category