JavaScript DHTML/Node Operation/removeAttribute — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 10:25, 26 мая 2010
"removeAttribute()" Example
<source lang="html4strict">
<html> <body> <script language="JavaScript">
function function1(){ var m = document.getElementById("myDiv").removeAttribute("id"); document.all.myB.innerText = "Click again"; if (m == true) { alert("Attribute removed"); } }
</script>
This is a div element
This is another div element
<input id="myB" type="button" value="Remove id attribute" onclick="function1();"> </body> </html>
</source>