Input Box'a Yazdırma.
3
●471
- 26-07-2010, 17:56:03Inputbox'a yapılan değişiklikler etki etmez ama bir katman(div) olursa veya Textarea o zaman olabilir çünkü text input sadece girişi kabul eder.SoutH adlı üyeden alıntı: mesajı görüntüle
- 29-07-2010, 00:59:45Kimlik doğrulama veya yönetimden onay bekliyor.
<script type="text/javascript"> function ekle(d,a,b) { var o=document.getElementById(d); if(document.selection && !window.opera) { var rg=document.selection.createRange(); if(rg.parentElement()==o) { rg.text = a+rg.text+b; rg.select(); } } else if(o.textLength||window.opera) { var s = o.value; o.value = s.substring(0,o.selectionStart)+a+s.substring(o.selectionStart,o.selectionEnd)+b+s.substring(o.selectionEnd,o.textLength); } else o.value += a+b; o.focus(); return false; } </script><textarea id="aciklama" name="mesaj" rows="8" style="width:89%;"></textarea> <input type="button" class="but" onClick="ekle('aciklama','(bkz: ',')')" value="bkz"/> <input type="button" class="but" onClick="ekle('aciklama','(gbkz: ',')')" value="gbkz"/>bu biraz daha degisigi eger bir metin seçersende bkz: yazan kısımdan sonraa onu yerlestirerek ekliyor fonksiyonun 3 degeri war 1. si textarea id si ornek : aciklama 2. si ilk kismi ortaasina yazi gelcek egerki secersen secmezsen direk bos ekler 3. de son kısmı