Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Prosty edytor JavaScript
Kargul1000
post
Post #1





Grupa: Zarejestrowani
Postów: 35
Pomógł: 0
Dołączył: 19.12.2010

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


Witam serdecznie chciałbym się dowiedzieć jak coś takiego napisać bo chciałbym dodać taki prosty edytor do swojej strony do dodawania kategorii i naprawdę nie wiem jak to ma działać proszę o jakieś wskazówki jak coś takiego napisać jakieś proste przykłady jak stworzyć samemu taki prosty edytor (IMG:style_emoticons/default/smile.gif) dzięki z góry.
  1. <input class="button" accesskey="b" name="addbbcode0" value=" B *" style="font-weight: bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" type="button">
  2. <input class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style: italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" type="button">
  3. <input class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" type="button">
  4.  
  5. <tr><td>Nazwa Kategorii</td></tr><tr><td><input type="text" name="NazwaKategorii" maxlenght="255" size="30"></td></tr>
  6. <tr><td>Opis Kategorii</td></tr><tr><td> <TEXTAREA NAME="OpisKategorii" COLS=71 ROWS=20></TEXTAREA></td></tr>
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Kargul1000
post
Post #2





Grupa: Zarejestrowani
Postów: 35
Pomógł: 0
Dołączył: 19.12.2010

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


Znalazłem na forum takie coś ale to nie chce działać nie wiem dlaczego (IMG:style_emoticons/default/sad.gif) (
  1.  
  2. <html>
  3. <head>
  4. <script type="text/javascript">
  5. function insertBB(bb)
  6.  
  7. {
  8. var bbcode = document.getElementById('newscontent').value;
  9. switch(bb)
  10. {
  11. case 'B': bbcode += ""; break;
  12. case 'I': bbcode += ""; break;
  13. }
  14.  
  15. document.getElementById('newscontent').value = bbcode;
  16.  
  17. }
  18. </script>
  19. </head>
  20. <body>
  21. <input type="button" value=" B " onclick="insertBB('B')" />
  22. <input type="button" value=" I " onclick="insertBB('I')" /><br><br>
  23. <textarea style="width:500px; height: 250px;" id="newscontent"></textarea>
  24. </body>
  25.  
  26. </html>
  27.  
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: 6.10.2025 - 21:45