Donanım Merkezi
 

Geri git   Donanım Merkezi > Yazılım > Webmaster Alanı - Web tasarımı, web programlama vs > Java Script

Cevapla
 
LinkBack Seçenekler Stil
Alt 03-12-2005, 09:47 PM   #1 (permalink)
Administrator
 
Üyelik tarihi: Nov 2004
Nerden: İstanbul
Mesajlar: 352
İtibar Gücü: 10 ЯeboR is on a distinguished road
Değişen Buton

Değişen Buton

Butonda belirtilen linkler sürekli değişiyor.


<HEAD>..</HEAD> arasına eklenecek kod :



<BASE TARGET="welcome">

<SCRIPT LANGUAGE="JavaScript">

var startTime =null;

var timerID =null;

var initial =new Date();

var pos =0;

var menuItem =null;

function initArray() {

this.length = initArray.arguments.length

for (var i = 0; i < this.length; i++) {

this[i+1] = initArray.arguments[i]

}

}

function parsemenuItem(data,num) {

for(var i=0;i<data.length;i++) {

if(data.substring(i,i+1)=="|") break;

}

if (num==0) return(data.substring(0,i));

else return(data.substring(i+1,data.length));

}

function startTimer() {

initial = new Date();

startTime=initial.getTime();

stopTimer();

menuItem = new initArray("Netscape|http://www.netscape.com",

"Microsoft|http://www.microsoft.com",

"BHS|http://www.bhs.com",

"Yahoo|http://www.yahoo.com",

"Excite|http://www.excite.com",

"Hotbot|http://www.hotbot.com",

"Online Solutions|http://www.onsol.com",

"Email|mailto:info@onsol.com"

);

showTimer();

}

function stopTimer() {

timerID=null;

menuItem=null;

}

function showTimer() {

pos= (pos == menuItem.length) ? 1 : pos + 1;

document.forms[0].elements[0].value=parsemenuItem(menuItem[pos],0);

timerID=window.setTimeout('showTimer()',1000);

}

function goToUrl() {

this.location=parsemenuItem(menuItem[pos],1);

return (false);

}

</SCRIPT>




<BODY>..</BODY> arasına eklenecek kod :


<FORM>

<INPUT TYPE="button" VALUE=" NEREYE? " NAME="goTo"

onClick="window.goToUrl()">

</FORM>



NOT : <body> tagını <BODY onLoad="window.startTimer()"> olarak değiştirin.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
[
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
]
ЯeboR Çevrimdışı  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this Post!Google Bookmark this Post!
Alıntı ile Cevapla
Cevapla



Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 
Seçenekler
Stil

Yetkileriniz
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-KodlarıKapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık


Bütün Zaman Ayarları WEZ +4 olarak düzenlenmiştir. Şu Anki Saat: 08:05 AM .


Donanım forumu - oyun - gtaoyun hilelerioyun - voip  - eğlence
 
 

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0