Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Replace znaki specjalne
slammer
post 20.09.2007, 19:02:53
Post #1





Grupa: Zarejestrowani
Postów: 187
Pomógł: 6
Dołączył: 31.08.2005
Skąd: Bielsko-Biała

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


mam taki kod:

  1. function dodajStrzalke(id){
  2. document.getElementById(id).style.paddingLeft='19px';
  3. document.getElementById(id).style.width='128px';
  4. document.getElementById(id).innerHTML='⇒ '+document.getElementById(id).innerHTML
  5. }
  6.  
  7. function usunStrzalke(id){
  8. document.getElementById(id).style.paddingLeft='30px';
  9. document.getElementById(id).innerHTML = document.getElementById(id).innerHTML.replace(/⇒ /gi, "");
  10. }


problem polega na tym że nie wiem w jaki sposób zastąpić znak ⇒ (taka strzaleczka w prawo) na pusty. Szukałem kodu szesnastkowego ego znaku, ale nic nie znalazłem :/ Proszę o pomoc.


EDIT:
rozwiązałem już problem w taki sposób:
  1. document.getElementById(id).innerHTML = document.getElementById(id).innerHTML.replace(/\u21D2 /gi, '');


Ten post edytował slammer 20.09.2007, 21:58:51
Go to the top of the page
+Quote Post

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 Wersja Lo-Fi Aktualny czas: 12.06.2025 - 20:41