Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> wyswietlenie wierszy tabeli po kliknieciu przycisk
AxZx
post
Post #1





Grupa: Zarejestrowani
Postów: 1 385
Pomógł: 55
Dołączył: 1.03.2005
Skąd: śląsk

Ostrzeżenie: (0%)
-----


witam

mam tabele w ktorej pewne wiersze maja atrybut class="nad_id55"

jaka funkcje napisac zeby zmienic ta funkcje na inna ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
my_identify
post
Post #2





Grupa: Zarejestrowani
Postów: 24
Pomógł: 0
Dołączył: 5.02.2006

Ostrzeżenie: (0%)
-----


Kod
function switchStyle(strTagName, strClassName, newClassName){
    var arrElements = (strTagName == "*" && document.all)? document.all : document.getElementsByTagName(strTagName);
    var element;

    for(var i=0; i<arrElements.length; i++){
        element = arrElements[i];
        if(element.className==strClassName){
     element.className=newClassName;
        }  
    }
}

switchStyle("tr", "nad_id55", "NowyStyl");


Troche niezbyt eleganckie, ale działa (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 5.10.2025 - 11:09