Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [js] zakres liczb w polu input
grzegorz_g
post
Post #1





Grupa: Zarejestrowani
Postów: 259
Pomógł: 0
Dołączył: 26.10.2004

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


mam taki oto formularz:

  1. <form method="post" name="zlicz3" id="zlicz3" style="display:inline;" action="indexbets.php">
  2.  
  3. <input type="hidden" name="kurs2" id="kurs2" value="<? print $agg ?>" />
  4. <input type="text" id="f1" value="" />
  5. </form>


w jaki najprostszy sposób ograniczyc pole f1 dla zakresu liczb np. 100 - 2000 ; tel liczby bedą generowane przez php.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
seiya
post
Post #2





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 18.04.2007

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


Kod
document.zlicz3.stawka.value = document.zlicz3.stawka.value.substr(0, document.zlicz3.stawka.value.length - 1);

http://w3schools.com/jsref/jsref_substr.asp
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: 11.10.2025 - 09:00