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:
>> Arşivimiz Forum'da Dynamic drop down list (ing) ile ilgili açılmış konuları ara>> Veya bu içerik ile ilgili yeni bir konu aç
<script type="text/javascript"> /* This script and many more are available free online at The JavaScript Source!! http://javascript.internet.com Created by: Sandeep Gangadharan | http://www.sivamdesign.com/scripts/ */ function changer(link) { if (link=="") { return; } //====================== // Edit this portion below. For each new state copy and paste // the entire IF statement and change the name of the state and the cities. // Make sure the spelling of the state is the same in the IF statement and in the link. if (link=="Arizona") { document.theForm.theState.value="Arizona"; var theOptions=new Array ( "Bisbee", "Deer Valley", "Flagstaff", "Mesa", "Phoenix"); } else if (link=="California") { document.theForm.theState.value="California"; var theOptions=new Array ( "Alameda", "Bakersfield", "Burbank", "Los Angeles"); } else if (link=="Florida") { document.theForm.theState.value="Florida"; var theOptions=new Array ( "Altamonte Springs", "Boca Raton", "Miami", "West Palm Beach"); } else if (link=="New York") { document.theForm.theState.value="New York"; var theOptions=new Array ( "Albany", "East Rockaway", "New York City"); } // Do not edit anything below this line: //====================== i = document.theForm.secondChoice.options.length; if (i > 0) { document.theForm.secondChoice.options.length -= i; document.theForm.secondChoice.options[i] = null; } var theCount=0; for (e=0; e<theOptions.length; e++) { document.theForm.secondChoice.options[theCount] = new Option(); document.theForm.secondChoice.options[theCount].text = theOptions[e]; document.theForm.secondChoice.options[theCount].value = theOptions[e]; theCount=theCount+1; } } // NOTE: [document.theForm.theState.value] will get you the name of the state, // and [document.theForm.secondChoice.value] the name of the city chosen </script> <form name=theForm> <strong>Select a State:</strong><br> <a href="javascript:changer('Arizona')">Arizona</a> | <a href="javascript:changer('California')">California</a> | <a href="javascript:changer('Florida')">Florida</a> | <a href="javascript:changer('New York')">New York</a> <br><br> <strong>Then ...</strong><br> <input type="hidden" name="theState"> <select name="secondChoice"> <option value="">Select a City</option> </select> </form>
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