ANA SAYFA | FORUM | BLOG | SİTENİZ İÇİN | İÇERİK EKLE | EN YENİLER | EN POPÜLERLER | EN BEĞENİLENLER | REKLAM | İLETİŞİM
Arama:
Tüm kategorilerde Google Forumda JAVAScript Araçlar
// ÖZELLEŞTİR
E-posta:
Şifre:
Üye Ol
|
Şifremi Unuttum
>> ARŞİVİMİZ FORUM AÇILDI! (0 yorum)>> Ramazan Bayramınız kutlu olsun (2 yorum)>> Kurban Bayramı (0 yorum)>> 10 Kasım (1 yorum)>> CUMHURİYET BAYRAMI (0 yorum)
// EN YENİLER
// EN POPÜLER
// Anasayfa » JAVASCRIPT» Form işlemleri
Oy:
<script type="text/javascript"> /* This script and many more are available free online at The JavaScript Source!! http://javascript.internet.com Created by: Matt Murphy | http://www.matts411.com/ */ function autoSelect(selectTarget) { if(selectTarget != null && ((selectTarget.childNodes.length == 1 && selectTarget.childNodes[0].nodeName == "#text") || (selectTarget.tagName == "INPUT" && selectTarget.type == "text"))) { if(selectTarget.tagName == 'TEXTAREA' || (selectTarget.tagName == "INPUT" && selectTarget.type == "text")) { selectTarget.select(); } else if(window.getSelection) { // FF, Safari, Opera var sel = window.getSelection(); var range = document.createRange(); range.selectNode(selectTarget.firstChild); sel.removeAllRanges(); sel.addRange(range); } else { // IE document.selection.empty(); var range = document.body.createTextRange(); range.moveToElementText(selectTarget); range.select(); } } } </script> <h4 style="margin-bottom: 0;">A <code>div</code> Element:</h4> <div onclick="autoSelect(this);"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam ultrices vestibulum elit. Mauris congue sapien sed dolor. Pellentesque sem augue, porttitor id, placerat ac, congue ac, eros. Etiam fermentum consectetuer pede. Donec tincidunt. Suspendisse non nisi. In hac habitasse platea dictumst. In hac habitasse platea dictumst. Integer porta egestas sapien. </div> <h4 style="margin-bottom: 0;">An <code>input</code> Element:</h4> <input type="text" size="50" onclick="autoSelect(this);" value="Lorem ipsum dolor sit amet, consectetuer adipiscing elit."> <h4 style="margin-bottom: 0;">A <code>textarea</code> Element:</h4> <textarea rows="5" cols="30" onclick="autoSelect(this);"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam ultrices vestibulum elit. Mauris congue sapien sed dolor. Pellentesque sem augue, porttitor id, placerat ac, congue ac, eros. Etiam fermentum consectetuer pede. </textarea> <h4 style="margin-bottom: 0;">A <code>pre</code> Element:</h4> <pre onclick="autoSelect(this);"> function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'none') e.style.display = 'block'; else e.style.display = 'none'; } </pre>
Kodu Kopyala
Hata Bildir | Tavsiye Et
Bu içeriğe oy verin:
Yorumlar / Yeni Yorum Yaz Bu içeriğe yorum yazılmamış.
ANA SAYFA | İÇERİK EKLE | YENİ EKLENENLER | EN POPÜLERLER | EN BEĞENİLENLER | REKLAM | DESTEKLEYENLER | İLETİŞİM
JAVAScript İndir © 2004 - 2008Web Tasarımı: Emir Emiroğlu | Kodlama: Can "FiNaRFiN" HANHAN , Korkut TAHAOĞLU, Göktuğ İÇÖZ