Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript]js problem ze elementem
neo1986kk
post
Post #1





Grupa: Zarejestrowani
Postów: 561
Pomógł: 3
Dołączył: 2.02.2009

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


Witam dlaczego taki zapis wywala mi UNDEFINED przecież ja mu podaje nazwę elementu...
  1. <textarea name="osobie" disabled="disabled" onmouseout="document.getElementById('osobie').disabled=true; edit('osobie');">
  2.  
  3. function edit(elema){
  4. sprawdz=elema.value;
  5. alert(sprawdz);
  6. }
  7.  
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




rety.... nadales dla textarea NAME=OSOBIE a potem chcesz pobrac wartosc wlasnie elementu o nazwie OSOBIE.
Czemu więc się dziwisz?(IMG:style_emoticons/default/questionmark.gif) ?

Jak chcesz dodowolnego to podawaj tam ID elementu, dla elementu nadaj ID (oprócz NAME) a potem w funkcji dobieraj się poprzez
document.getElementById(...).value
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 16.10.2025 - 20:51