![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 26 Pomógł: 0 Dołączył: 17.02.2005 Skąd: skad Ostrzeżenie: (0%) ![]() ![]() |
Nie moge rozwiazac problemu z funkcja w JS ktora po zaznaczeniu czesci tekstu w polu i nacisnieciu przycisku wykonywujacego funkcje obejmywalaby ten tekst w tagi np . Tak jak jest tutaj na tym forum w dodawaniu postow. Bardzo tego potrzebuje. Z gory dzieki
|
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Przyjaciele php.pl Postów: 2 258 Pomógł: 16 Dołączył: 21.09.2004 Skąd: Kielce Ostrzeżenie: (0%) ![]() ![]() |
Link: http://www.webgurusforum.com/8/12/0
Lekka modyfikacja: Kod <script type="text/javascript"> function Bold() { var txtarea = document.getElementById("area"); var selStart = txtarea.selectionStart; var selEnd = txtarea.selectionEnd; document.getElementById("area").value= (txtarea.value).substring(0,selStart)+ "[B]"+(txtarea.value).substring(selStart, selEnd)+"[/B]" + (txtarea.value).substring(selEnd,txtarea.value.length); } </script> Pięknie to nie wygląda, ale robi to co chcesz (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) |
|
|
![]() ![]() |
![]() |
Aktualny czas: 12.10.2025 - 11:28 |