Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> ilosc znaków, w textarea
bronx
post
Post #1





Grupa: Zarejestrowani
Postów: 333
Pomógł: 0
Dołączył: 4.03.2004

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


witam

jak ma wyglądać skrypt który pokazuje ile jeszcze znaków można wpisać w odpowiedni formularz (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

z góry dzieki za pomoc

pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
wassago
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 701
Pomógł: 0
Dołączył: 26.06.2002
Skąd: Londyn

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


  1. <!--
  2. This file retrieved from the JS-Examples archives
  3. 1000s of free ready to use scripts, tutorials, forums.
  4. Author: Saqib - http://usgems.net/HALF
  5. -->
  6.  
  7. function alll() {
  8. var m = document.f1.t1.value;
  9. var mm = m.length;
  10. document.f1.t2.value = mm;
  11. if(mm >= 10) {
  12. alert("Max is 10");
  13. document.f1.t1.value = "";
  14. }
  15. setTimeout("alll()" ,0);
  16. }
  17.  
  18.  
  19. </head>
  20.  
  21. <form name="f1">
  22. <input type="Textbox" name="t1" onfocus="alll()"><br />
  23. <input type="Textbox" name="t2">
  24. </form>
  25. </body>
  26. </html>
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: 25.12.2025 - 22:51