![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Moderatorzy Postów: 1 566 Pomógł: 37 Dołączył: 14.05.2003 Skąd: Kraków ![]() |
Witam...
Mam pewien problem: kod js: Kod function add_tag(stag, etag) { obj = document.form.text; r = document.selection.createRange(); if(document.selection.type == 'Text' && (obj.value.indexOf(r.text) != -1)) { a = r.text; r.text = stag + r.text + etag; if (obj.value.indexOf(document.selection.createRange().text) == -1) { document.selection.createRange().text = a; } } else { insert_tag(obj, stag + etag); } obj.focus(); } function insert_tag(textel, text) { if (textel.createTextRange && textel.caretPos) { var caretPos = textel.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; } else { textel.value = textel.value + text; } textel.focus(); } Kod HTML:
Efekt: http://ociu.100tka.net/book/index.php?action=form Sprostowanie: Po kliknięciu na button B, I lub U nie wskakuje tag :/ Help ! |
|
|
![]() ![]() |
![]() |
Aktualny czas: 20.08.2025 - 13:25 |