![]() |
|
| |||||||
|
| WebMasTer SiTeSi |
| | Seçenekler |
|
#1
| ||||
| | ||||
formu otomatik doldurma fonksyonudış dosya HTML-Kodu: /* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Ilanio | http://www.webdeveloper.com/forum/showthread.php?t=119753 */
var aMail = new Array("","","","","", "", "", "");
aMail.sort();
function Complete(obj, evt) {
if ((!obj) || (!evt) || (aMail.length == 0)) {
return;
}
if (obj.value.length == 0) {
return;
}
var elm = (obj.setSelectionRange) ? evt.which : evt.keyCode;
if ((elm < 32) || (elm >= 33 && elm <= 46) || (elm >= 112 && elm <= 123)) {
return;
}
var txt = obj.value.replace(/;/gi, ",");
elm = txt.split(",");
txt = elm.pop();
txt = txt.replace(/^\s*/, "");
if (txt.length == 0) {
return;
}
if (obj.createTextRange) {
var rng = document.selection.createRange();
if (rng.parentElement() == obj) {
elm = rng.text;
var ini = obj.value.lastIndexOf(elm);
}
} else if (obj.setSelectionRange) {
var ini = obj.selectionStart;
}
for (var i = 0; i < aMail.length; i++) {
elm = aMail[i].toString();
if (elm.toLowerCase().indexOf(txt.toLowerCase()) == 0) {
obj.value += elm.substring(txt.length, elm.length);
break;
}
}
if (obj.createTextRange) {
rng = obj.createTextRange();
rng.moveStart("character", ini);
rng.moveEnd("character", obj.value.length);
rng.select();
} else if (obj.setSelectionRange) {
obj.setSelectionRange(ini, obj.value.length);
}
} HTML-Kodu: <script type="text/javascript" src="autoCompleteFunction.js"></script> body HTML-Kodu: <form name="anyForm" style="text-align: center;"> <small>(Begin entering one of the names below)<br> <em>Albert, Allen, Barry, Beth, Hal, Harry, Steve, Susan</em></small><br><br> <strong>Send e-mail to:</strong> <input type="text" name="anyName" onKeyUp="Complete(this, event)"> </form> |
|
#2
| ||||
| | ||||
| autoFill.js HTML-Kodu: /* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Vladimir Geshanov | */
function explain( name, output, msg ) {
newwin = window.open( '', '', 'top=80,left=60,width=350,height=200' );
if ( !newwin.opener ) newwin.opener = self;
newwin.opener.document.bgColor = "EBEBEB";
with ( newwin.document ) {
open();
write( '<body onLoad="document.form.box.focus()">' );
write( '<form name=form ' );
write( ' onSubmit=opener.document.bgColor="EAE8E4";window.close()>' );
write( msg );
write( '<br>
' );
write( '<font face=Verdana size=2>' );
write( '<p>You may enter your ' + name + ' here ' );
write( '<p>and it will be copied into the form for you.</p>' );
write( '<center>' + name + ':' );
write( '</font>' );
write( '<input type=text name=box size=10 onKeyUp=' + output + '=this.value>' );
write( ' ' );
write( '<input type=submit value="Finish">' );
write( '</center></form>' );
close();
}
} HTML-Kodu: <script type="text/javascript" src="autoFill.js"></script> HTML-Kodu: <span class=DefMenuText>(click on "help" to open the new window)</span> <form name=form> <span class=PreText>Username:</span> <input type=text name=username size=10> <span class=BodyText>[<a href="javascript:explain( 'User Name', 'opener.document.form.username.value', '<font face=Verdana size=2>' + 'The user name field is where you select a user name that ' + 'you will use every time you access this site.' );">help</a>]</span> <br> <span class=PreText>Password:</span> <input type=text name=password size=10> <span class=BodyText>[<a href="javascript:explain( 'Password', 'opener.document.form.password.value', '<font face=Verdana size=2>' + 'The password field is where you select a unique password ' + 'for your account. This password will be required each ' + 'time you login to the site.' );">help</a>]</span> </form> bir forma yazı yazdığınızda aynı yazı aynı anda başka bi forma da yazılır ![]() |
![]() |
| Arama Etiketleri: doldurma, fonksyonu, formu, otomatik |
| Seçenekler | |
| |
Benzer Konular | ||||
| Konu | Konu Açanlar | Forum | Cevaplar | Güncel Mesajlar |
| Beni Hatırla Kutucuğunu Doldurma | zehirtr | Template Modifikasyonları | 0 | 25-02-2008 06:48 |
| siteye Anahtar kelime doldurma | kadınca | SEO Arama Motoru Optimizasyonu | 0 | 17-02-2008 12:09 |
| Web Formlarini Visual Basicle Otomatik Doldurma | B737 | Visual Basic & Action script | 0 | 24-01-2008 02:30 |
| javascript showdate() fonksyonu | banias | Javascript kodları | 0 | 26-11-2007 12:27 |
| Alanı Yazı İle Doldurma | Professionel | Photoshop | 0 | 24-11-2007 05:04 |
![]() |