Właściwość Wartość HTML DOM
Przykłady
Zwraca wartości właściwości:
document.getElementsByTagName("button")[0].attributes[0].value;
wyjście:
myfunction()
Spróbuj »
Ustawianie wartości nieruchomości
Przykłady
Ustaw atrybuty stylu elementu head:
var h=document.getElementsByTagName("H1")[0];
h.getAttributeNode("style").value="color:green";
h.getAttributeNode("style").value="color:green";
zmiany właściwości stylu wcześniej:
Hello World
Styl nieruchomości Review:
Hello World
Spróbuj »
Definicja i Wykorzystanie
Zestawy Własności Wartość lub zwraca wartość nieruchomości.
Pomoc Browser
Wszystkie główne przeglądarki obsługują wartość atrybutu
gramatyka
Ustawianie wartości nieruchomości
attribute .value= value
Zwraca wartości nieruchomości
attribute .value
dane techniczne
Zwraca: | wartość String reprezentuje właściwość. |
---|---|
wersja DOM | Rdzeń Level 1 |