Karakter Değiştirme
Bu script ile ziyaretçinize kimi karekterleri değiştirme olanağı sağlayabilirsiniz örnekte "a" harfi "z" harfine dönüşüyor siz ihtiyacınız doğrultusunda değişen harfleri çoğaltabilirsiniz.
ÖRNEK
<SCRIPT LANGUAGE="JavaScript"> <!-- Begin function replaceChars(entry) { out = "a"; // replace this add = "z"; // with this temp = "" + entry; // temporary holder while (temp.indexOf(out)>-1) { pos= temp.indexOf(out); temp = "" + (temp.substring(0, pos) + add + temp.substring((pos + out.length), temp.length)); } document.subform.text.value = temp; } // End --> </script>
<center> <form name="subform"> <input type=text name=text size=40 value="abcdabcd"><br> <input type=button name=action value="Değiştir" onClick="replaceChars(document.subform.text.value);"> <!-- Or to make it change when the user clicks the next --> <!-- field, use this instead of the previous two lines: --> <!-- <input type=text name=text size=40 value="abcdabcd" onBlur="replaceChars(this.value);" --> </form> </center>
Copyright © 2002-2004 www.javascriptbankasi.com.tr.tc
Mail:javascriptbankasi@hotmail.com