Hoşgeldin, Ziyaretçi |
Sitemizden yararlanabilmek için kayıt olmalısınız.
|
Kimler Çevrimiçi |
Şu anda 30 aktif kullanıcı var. » (0 Üye - 28 Ziyaretçi) Bing, Google
|
|
|
Güne Göre Link |
Yazar: ЯeboR - 12-03-2005, 22:22 - Forum: Java Script
- Yorum Yok
|
 |
Güne Göre Link
Bu script ile ayın 31 gününde aynı link ile ziyaretçinizi farklı adreslere göndermeniz mümkün.
<BODY>..</BODY> arasına eklenecek kod :
<script>
/*Day of the link script credit-
By Website Abstraction (http://www.wsabstract.com)
Over 200+ free scripts here!
*/
var daylinks=new Array()
/*
Enter the 31 urls below you wish to go to for each day of the month. Note that if the current month contains less than 31 days, then some of the urls will simply not be used
*/
daylinks[1]="http://www.cnn.com"
daylinks[2]="http://www.abcnews.com"
daylinks[3]="http://www.cnet.com"
daylinks[4]="http://www.geocities.com"
daylinks[5]="http://www.lycos.com"
daylinks[6]="http://www.infoseek.com"
daylinks[7]="http://www.hotbot.com"
daylinks[8]="http://www.tripod.com"
daylinks[9]="http://www.wsabstract.com"
daylinks[10]="http://www.wired.com"
daylinks[11]="http://www.download.com"
daylinks[12]="http://www.windows95.com"
daylinks[13]="http://www.shareware.com"
daylinks[14]="http://www.builder.com"
daylinks[15]="http://www.htmlgoodies.com"
daylinks[16]="http://www.webreference.com"
daylinks[17]="http://www.webdeveloper.com"
daylinks[18]="http://www.developer.com"
daylinks[19]="http://www.news.com"
daylinks[20]="http://www.techweb.com"
daylinks[21]="http://www.zdnet.com"
daylinks[22]="http://www.excite.com"
daylinks[23]="http://www.nba.com"
daylinks[24]="http://www.microsoft.com"
daylinks[25]="http://www.netscape.com"
daylinks[26]="http://www.amazon.com"
daylinks[27]="http://www.xml.com"
daylinks[28]="http://www.espn.com"
daylinks[29]="http://www.nbc.com"
daylinks[30]="http://www.cbs.com"
daylinks[31]="http://www.hotwired.com"
var mydate=new Date()
var today=mydate.getDate()
</script>
Günün sitesine gitmek için tıkla!
|
|
|
Browsera Göre Link |
Yazar: ЯeboR - 12-03-2005, 22:21 - Forum: Java Script
- Yorum Yok
|
 |
Browsera Göre Link
Ziyaretçinizin browser modeline göre farklı sayfalara gönderebileceğiniz bir link örneği.
<HEAD>..</HEAD> arasına eklenecek kod :
<SCRIPT LANGUAGE="JavaScript">
<!-- Hiding from other browsers
// Browser Detector (v. 1.0)
// Author: Jason Tschopp
// Email: tschopp@greenapple.com
// Url: http://www.greenapple.com/~tschopp/
// Notes: Permission is granted to anyone for use
// on the internet, provided this header stays with
// the script and this header stays in intact.
var name = navigator.appName
if (name == "Microsoft Internet Explorer")
url=("explorer.html");
else
url=("nestcape.html")
document.write('TIKLA');
// -->
</SCRIPT>
|
|
|
Açıklamalı Link-1 |
Yazar: ЯeboR - 12-03-2005, 22:16 - Forum: Java Script
- Yorum Yok
|
 |
Açıklamalı Link-1
Mouseu linklerin üzerine getirince yanda açıklamaları beliriyor.
<BODY>..</BODY> arasına eklenecek kod :
<style>
DIV{font-family:arial,helvetica; font-size:10pt}
</style>
<script>
/*
Created by A1 JavaScripts - http://www.a1javascripts.com/
This may be used freely as long as this msg is intact!
*/
//You have to set some variables here:
//Set the font for the msg
msgFont='Arial,helvetiva'
//Set the fontSize in px
msgFontSize="12"
//Set the fontColor
msgFontColor="black"
/*
Here's the array that holds the text to change the divmessage to
when you mouseover. Change the text here
*/
messages=new Array(6)
messages[0]="JavaScript
A heap of <u><font color=ff0000>free</font></u> javascripts to enhance your site!"
messages[1]="JavaOnline
The largest directory of <u><font color=ff0000>free</font></u> webmaster resources on the planet!"
messages[2]="Başlık2
25 megs of <u><font color=ff0000>free</font></u> webspace;
httpcity.com/you!"
messages[3]="Başlık3
A monstrous collection of <u><font color=ff0000>free</font></u> graphics!"
messages[4]="Başlık4
The HOTTEST <u><font color=ff0000>free</font></u> clipart and resource sites ranked by popularity!"
messages[5]="Başlık5
Download tons of <u><font color=ff0000>free</font></u> Software!"
messages[6]="Geri dön
Geri dönmek için<u><font color=ff0000>free</font></u> hemen tıkla!"
messages[7]=""
//nothing needs to be changed below here
ie=document.all?1:0
n=document.layers?1:0
//Constructing the ChangeText object
function makeChangeTextObj(obj){
this.writeref=(n) ? eval('document.'+obj+'.document'):eval(obj);
this.writeIt=b_writeIt;
}
function b_writeIt(text){
if(n){
this.writeref.write(text)
this.writeref.close()
}
if(ie)this.writeref.innerHTML=text
}
function changeText(num){
if(ie || n) oMessage.writeIt('<span style="font-size:' +msgFontSize+'px; font-family:'+msgFont+'; color:'+msgFontColor+'">'+messages[num]+'</span>')
}
function changeTextInit(){
if(ie || n) oMessage=new makeChangeTextObj('divMessage')
}
//Calls the init function on pageload
onload=changeTextInit
</script>
<div id="divlinks" style="position:absolute; left:10; top:150">
JavaScript
JavaOnline
Http City
Free Clip Images
1-Click-Clipart
FreeWare Files
Geri dön
</div>
<table Border=0 cellpadding=0 cellspacing=0 width="400" hight="200">
<td align=center width="100%" height="100%"><div id="divMessage" style="position:absolute; left:200; top:300">
This is the default text that will show in
3.x browsers. You have to place this with tables or
something instead of layers for backwards compatibility.</td></table>
</div>
|
|
|
Uzayıp Kısalan Buton |
Yazar: ЯeboR - 12-03-2005, 22:13 - Forum: Java Script
- Yorum Yok
|
 |
Uzayıp Kısalan Buton
Bu script ile sayfanızda uzayıp kısalan butonlar yapabilirsiniz.
<BODY>..</BODY> arasına eklenecek kod :
<SCRIPT LANGUAGE="JavaScript">
<!--
var timerID = null
var timerRunning = false
var charNo = 0
var charMax = 0
var lineNo = 0
var lineMax = 2 // number of URL's you will use
var lineArr = new Array(lineMax)
var urlArr = new Array(lineMax)
lineArr[1] = "Geri Dön......."
urlArr[1] = "java2.htm"
lineArr[2] = "Ana Menü......."
urlArr[2] = "main.htm"
var lineText = lineArr[1]
function StartShow() {
StopShow()
ShowLine()
timerRunning = true
}
function FillSpaces() {
for (var i = 1; i <= lineWidth; i++) {
spaces += " "
}
}
function StopShow() {
if (timerRunning) {
clearTimeout(timerID)
timerRunning = false
}
}
function ShowLine() {
if (charNo == 0) { // Next line
if (lineNo < lineMax) {
lineNo++
}
else {
lineNo = 1
}
lineText = lineArr[lineNo]
charMax = lineText.length
}
if (charNo <= charMax) { // Next char
document.formDisplay.buttonFace.value = lineText.substring(0, charNo)
charNo++
timerID = setTimeout("ShowLine()", 100)
}
else {
charNo = 0
timerID = setTimeout("ShowLine()", 3000)
}
}
function GotoUrl(url)
{
top.location.href = url
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write("<FORM NAME=\"formDisplay\">");
document.write("<INPUT TYPE=\"BUTTON\" NAME=\"buttonFace\" VALUE=\"&{lineText}\" SIZE=\"18\" onClick=\"GotoUrl(urlArr[lineNo])\">");
document.write("</FORM>");
StartShow();
//-->
</SCRIPT>
|
|
|
Geri Dön Tuşu |
Yazar: ЯeboR - 12-03-2005, 22:11 - Forum: Java Script
- Yorum (1)
|
 |
Geri Dön Tuşu
Bu script ile sayfanızda bir geri tuşu oluşturabilirsiniz.
<BODY>..</BODY> arasına eklenecek kod:
<input onclick="history.back();" type="button" value="<<geri dön">
|
|
|
Hareketli Buton-1 |
Yazar: ЯeboR - 12-03-2005, 21:54 - Forum: Java Script
- Yorum Yok
|
 |
Hareketli Buton-1
Mouseu üzerine getirince hareket eden butonlar ister misiniz?
<HEAD>..</HEAD> arasına eklenecek kod :
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
pos = 15;
TO = null;
function shake_funct2(object,speed)
{
obj = eval(object)
txt = clear_space(obj.value);
if (pos == 15)
{
txt = txt + " ";
pos = -15;
}
else
{
txt = " " + txt;
pos = 15;
}
obj.value = txt;
obj.style.width = parseInt(obj.style.width) + pos;
obj = object
sp = speed
TO = setTimeout("shake_funct2(obj,sp)",speed);
}
function clear_space(text)
{
while (text.substring(0,1) == " ")
{
text = text.substring(1,text.length);
}
while(text.substring(text.length-1,text.length) == " ")
{
text = text.substring(0,text.length-1);
}
return text;
}
function end_shake_funct2(object)
{
clearTimeout(TO);
obj = eval(object);
txt = clear_space(obj.value);
obj.value = txt;
//alert(pos);
if (pos == -15)
{
obj.style.width = parseInt(obj.style.width) +15;
}
pos = 15
}
// End -->
</script>
<BODY>..</BODY> arasına eklenecek kod :
<form name=myform2>
<table border=0>
<tr><td>
Mouseu üzerine getirin
</td>
<td align=center width=160>
<input type=button value = "Yavaş" style="font-size:10;width:150" onmouseover="shake_funct2(this,100)" onmouseout="end_shake_funct2(this)">
</td></tr>
<tr><td>
Mouseu üzerine getirin
</td>
<td align=center width=160>
<input type=button value = "Hızlı" style="font-size:10;width:150" onmouseover="shake_funct2(this,50)" onmouseout="end_shake_funct2(this)">
</td></tr>
</Table>
</form>
|
|
|
Değişen Buton |
Yazar: ЯeboR - 12-03-2005, 21:47 - Forum: Java Script
- Yorum Yok
|
 |
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.
|
|
|
Buton-6 |
Yazar: ЯeboR - 12-03-2005, 21:34 - Forum: Java Script
- Yorum Yok
|
 |
Buton-6
Bu seferki buton örneğimiz windows butonlarını andırıyor.
<HEAD>..</HEAD> arasına eklenecek kod :
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var button = new Array();
var action = new Array();
var buttonWidth = new Array();
/////////////////////////////////////////////////////////////////////////////
/////////////////////// BEGIN OF EDITABLE SECTION /////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Edit this for your buttons text and actions.
// You can add or remove as much buttons as you want.
// Just be sure to use "button[number]", "buttonWidth[number]" and "action[number]"
// for each button, using the same button number for the three variables!
//
// Text format is: '...text...<u>underlined_letter</u>...text...';
// Important: Underline just ONE letter and be very carefull from
// NOT to use the same letter for more than one button!!
// Try also not to use letters that already have a function under
// the browser (i.e. If you use "e", you'll activate your button
// AND the already asigned combination for "EDIT" menu.)
//
// In the time you need to refer to some button on other scripts, each button
// has an id based on "bnumber". For example, button 1 has the id "b1".
//
// Let's use 5 buttons for this example:
button[1] = '<u>Y</u>ahoo';
buttonWidth[1] = 150; //This is the button's width, in pixels.
action[1] = function () {
// Place here you actions for button 1:
window.open('http://www.yahoo.com');
// End of actions for button 1.
}
button[2] = '<u>A</u>ltavista';
buttonWidth[2] = 150; //This is the button's width, in pixels.
action[2] = function () {
// Place here you actions for button 2:
window.open('http://www.altavista.com');
// End of actions for button 2.
}
button[3] = '<u>J</u>donanimmerkezi';
buttonWidth[3] = 150; //This is the button's width, in pixels.
action[3] = function () {
// Place here you actions for button 3:
window.open('http://www.donanimmerkezi.com');
// End of actions for button 3.
}
button[4] = 'Ntv<u>m</u>snbc Haber Portalı';
buttonWidth[4] = 150; //This is the button's width, in pixels.
action[4] = function () {
// Place here you actions for button 1:
window.open('http://www.ntvmsnbc.com');
// End of actions for button 1.
}
///////////////////////////////////////////////////////////////////////////
/////////////////////// END OF EDITABLE SECTION /////////////////////////// ///////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
// Don't edit bellow or you could get errors! //
////////////////////////////////////////////////////////////////////////////
function placeButton(value) {
if (button[value]) {
if (button[value].indexOf('<u>') != -1) {
document.write('<button id="b'+value+'" style="Width : '+buttonWidth[value]+'px ; Height : 22px" onClick="action['+value+']()"><font face="MS Sans Serif" size="1">'+button[value]+'</button>');
} else {
alert('You didn\'t specify the underlined letter for the button number '+value+'. This button cannot be placed until you specify the underlined letter by using <u> and </u> tags.');
}
} else {
alert('You are trying to place the button number '+value+', but you didn\'t declare its values on the variables area. \r\rThe button '+value+' will not be placed until you specify the variables "button['+value+']" and "action['+value+']".');
}
}
document.write('<script'+'>');
document.write('function myfocus(n) {');
for (a=1; a<button.length; a++) {
document.write('if (n=='+a+') {document.all.b'+a+'.focus()}'); } document.write('}'); document.write('<'+'/script>');
function chkKey(evt) {
var mykey, alt, ctrl, shift;
if (window.Event) {
mykey = evt.which;
alt = (evt.modifiers & Event.ALT_MASK) ? true : false;
ctrl = (evt.modifiers & Event.CONTROL_MASK) ? true : false;
shift = (evt.modifiers & Event.SHIFT_MASK) ? true : false;
} else {
mykey = evt.keyCode;
alt = evt.altKey;
ctrl = evt.ctrlKey;
shift = evt.shiftKey;
}
if (mykey!=0 && mykey!=16 && mykey!=17 && mykey!=18) {
if (alt) {
for (i=1; i<button.length; i++) {
ui = button[i].indexOf('<u>');
ul = button[i].substring(ui + 3, ui + 4).toLowerCase();
if (String.fromCharCode(mykey).toLowerCase() == ul) {
myfocus(i);
action[i]();
break;
}
}
}
}
return true;
}
if (window.Event) {
document.captureEvents(Event.KEYDOWN);
document.onkeydown = chkKey;
} else {
document.onkeydown = function() {
return chkKey(event);
}
}
// End -->
</script>
<BODY>..</BODY> arasına eklenecek kod :
<script>placeButton(1)</script>
<script>placeButton(2)</script>
<script>placeButton(3)</script>
<script>placeButton(4)</script>
NOT : Butonlarda kimi harflerin altının çizilebildiğine dikkat edin. 8) in yerine 8parantez yazacaksınız. Smillerin kısayolları ile çakıştığından bu şekilde görünmekte.
|
|
|
|