![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 910 Pomógł: 44 Dołączył: 20.02.2008 Skąd: Łódź Ostrzeżenie: (20%) ![]() ![]() |
Witam. Otóż mam taki kod[html]
<HTML> <HEAD> <script LANGUAGE="JavaScript"> function koduj(){ var str = document.getElementById('input').value; var s = ""; for(i=0; i<str.length; i++){ //document.write(toAscii(str[i])+";"); s += String.fromCharCode(toAscii(str[i])); } document.getElementById('input').innerHTML = s; } </script> </HEAD> <BODY> <form> <textarea id="input"></textarea> <p> <input type=button value="Koduj" onClick="koduj();"> </center> <p> </form> </HTML> [/hmtl] Cały problem polega na tym, że nie pobiera mi wartości textarea'y. Ale gdy ustawie domyślna wartość textarea'y to wtedy pobiera prawidłowo. Skrypt ma zamieniać każdy znak stringa na kod ASCII, dodawać 3 i zamieniać na normalny znak. Proszę o pomoc |
|
|
![]()
Post
#2
|
|
![]() Grupa: Moderatorzy Postów: 36 557 Pomógł: 6315 Dołączył: 27.12.2004 ![]() |
nie: innerHTML
a: value -------------------- "Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista "Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 910 Pomógł: 44 Dołączył: 20.02.2008 Skąd: Łódź Ostrzeżenie: (20%) ![]() ![]() |
o rzeczywiście. Troche gafa. Dziekować
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 21.08.2025 - 07:43 |