İçeriğe geç
ShiftDelete.Net
Haber ara/ SDN'ye SorGiriş
Haber Akışı SDNTV İnceleme Forum Yapay Zeka Akıllı Telefon Elektrikli Otomobil Oyun ShiftDelete.Net Global Teknoloji Haberleri Mobil Otomobil Donanım Savunma Bilim Sosyal Medya İnternet Giyilebilir Teknoloji Rehber Ürünler Son dakika Yazarlar
  1. Ana sayfa
  2. Topluluk
  3. Programlama
  4. Web Programlama (PHP, ASP, HTML, CSS, JavaScript)
Web Programlama (PHP, ASP, HTML, CSS, JavaScript)

Jquey/Javascript Combobox İsteği :)

ffuurrkkaann22.10.20110 cevap1.880 görüntüleme
2011'den beri17 mesaj
#1
Merhaba Arkadaşlar

Resim değiştiren bir comboxa ihtiyacım var çok aramama rağmen bulmadım.Kendim de yazaman javascirpt bilgim hiç yok alltaki koda benzer birşey istiyorum altaki kodda yazılar değişiyor ben dosya yolunu belirtiğim resimlerin değişmesini istiyorum yardımcı olursanız sevirim.
<script type="text/javascript">function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
</script>
<center>
<form name="combowithtext">
<select name="example" size="1" onChange="showtext()">
<option value="http://www.cnet.com">Cnet</option>
<option value="http://www.cnn.com">CNN</option>
<option value="http://www.geocities.com">Geocities</option>
</select>
<input type="button" value="Go!"
onClick="gothere()"><br>
<textarea rows=5 cols=21 name="text"></textarea>


<script language="javascript">
<!--


/*
Combo box with description credit-
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free script here!
*/


var shortcut=document.combowithtext
var descriptions=new Array()


//extend this list if neccessary to accomodate more selections
descriptions[0]='<img src="file:///C|/xampp/htdocs/site/kullaniciresim/resim3.gif" width="200" height="200">'
descriptions[1]="Click here for CNN, one of the best sources online to get your news."
descriptions[2]="Click here for Geocities, and receive 10 megs of free web space."




shortcut.text.value=descriptions[shortcut.example.selectedIndex]
function gothere(){
location=shortcut.example.options[shortcut.example.selectedIndex].value
}


function showtext(){
shortcut.text.value=descriptions[shortcut.example.selectedIndex]
}
//-->
</script>


</form>
</center>


<p align="center">&nbsp;</p>
<p align="center"></p>
<p align="center">
<p align="center"></p>
<p align="center"></p>
<p align="center">&nbsp;</p>




şimdiden teşekkürler

Cevabını yaz

Cevap yazmak için giriş yap ya da üye ol. Eski forum kullanıcı adın ve parolanla girebilirsin.