Wednesday, June 13, 2007

javascript remove attribute method

removeAttribute() Syntax, Parameters and Note
Removes the specified attribute value from the element. 
Returns true (successful) or false (failed).
document.getElementById("elementID").removeAttribute(param1, param2)
document.all.elementID.removeAttribute(param1, param2) // IE only

    param1   Required; the name of the attribute.
    param2   Optional; the type of search. 
                       1           the default for a case-sensitive search
                       any other value for a non?case-sensitive search.
removeAttribute() example code
<script language="JavaScript">
function function2() {

<input type="text" id="mvname" readOnly="true" value="remove Attribute test" size="40"/> 

<input type="button" value="remove textbox's readOnly attribute" onclick="function2();">

Blogger Template Layout Design by [ METAMUSE ] : Code Name Gadget 1.1 Power By & Programming Blogs - BlogCatalog Blog Directory