![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 2 291 Pomógł: 156 Dołączył: 23.09.2007 Skąd: ITALY-MILAN Ostrzeżenie: (10%) ![]() ![]() |
Witam mam taki kod js:
Kod function error_input(id,lenght,error) { if(document.forms.reg.login.value.length < lenght) document.getElementById(id).innerHTML = error; else document.getElementById(id).innerHTML = ""; } Oczywiscie sprawdzam wszystko tez za pomoca php jednak mam pytanie chce to zautomatyzowac zeby byl 3 argument np input_name ktory bedzie zastepowal nazwe input'a ktory ma byc sprawdzany, chodzi mi o to zeby tutaj: document.forms.reg.login.value.length wartosc login byla zmieniana za pomoca argumentu funkcji kombinowalem juz cos ale nic. |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Moderatorzy Postów: 36 559 Pomógł: 6315 Dołączył: 27.12.2004 ![]() |
Kod document.forms.reg[input_name].value.length
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 11.10.2025 - 03:12 |