HtmL KoDLaR, GéNéL, PaYLaŞıM, EgLeNCé, KéYiF & HaYaT BuRaDa | BiLGiuBLiC BiLGi CuMHuRiYéTi
  Javascript Kodları
 

Açıklamalı Link
<Html><Head><Title>www.html-kodlari.tr.gg</title><html><head><meta http-equiv="Content-Language" content="tr"><meta http-equiv="Content-Type" content="text/html; charset=windows-1254"></head></html>
<!-- Bu Sayfa
www.html-kodlari.tr.gg Ürünüdür. -->
<SCRIPT LANGUAGE="JavaScript">
/*******************************************************************
*
* File    : AnimatedFader.js
*
* Created : 2000/05/28
*
* Author  : Roy Whittle  (
akin-aslan@hotmail.de) www.html-kodlari.tr.gg
*
* Purpose : To create fading text descriptions
*
* History
* Date         Version        Description
*
* 2000-05-28 1.0  Initial version. Based on the State Transition
*     Diagram created for animated rollovers I
*     modified the code to fade text.
* 2000-05-29 1.1  I did not follow the STD correctly and introduced
*     a bug that left objects in the ON state.
*     This is now corrected.
* 2000-06-07 1.2  Introduced a start colour so that the script
*     can be used on different backgrounds.
*     Change the var AnimationRunning and FrameInterval
*     so they don't conflict with animate2.js
* 2000-08-09 1.3  Added Gecko ( Netscape 6 Preview Release 1 ) support
*     - Ken workman
k.workman@3DASA.com
* 2000-10-15 1.4  Modified to make Netscpe 6 (PR3) more efficient
*     by just changing the color instead of replacing
*     the whole content of the DIV.
***********************************************************************/
/*** Create some global variables ***/
var FadingObject = new Array();
var FadeRunning=false;
var FadeInterval=30;
/*******************************************************************************/
/*** These are the simplest HEX/DEC conversion routines I could come up with ***/
/*** I have seen a lot of fade routines that seem to make this a             ***/
/*** very complex task. I am sure somene else must've had this idea          ***/
/*******************************************************************************/
var hexDigit=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
function dec2hex(dec)
{
return(hexDigit[dec>>4]+hexDigit[dec&15]);
}
function hex2dec(hex)
{
return(parseInt(hex,16))
}
/******************************************************************************************/
/***********************************************************
* Function   : createFaderObject
*
* Parameters : theDiv   - The name of the DIV in which to fade the text
*              numSteps - The number of steps to use in the fade.
*         startColor - The background colour of the page.
*
* Description : Creates an object that can hold the current
*               state of the fade animation for a particular DIV
***********************************************************/
function createFaderObject(theDiv, numSteps, startColor)
{
if(!startColor)
startColor = "000000";
this.name  = theDiv;
this.text  = null;
this.color  = "FFFFFF";
this.next_text = null;
this.next_color = null;
this.state  = "OFF";
this.index  = 0;
this.steps  = numSteps;
this.r  = hex2dec(startColor.slice(0,2));
this.g  = hex2dec(startColor.slice(2,4));
this.b  = hex2dec(startColor.slice(4,6));
}
/***********************************************************
* Function   : FadingText
*
* Parameters : theDiv   - The name of the DIV in which to fade the text
*              numSteps - The number of steps to use in the fade.
*
* Description : Library function to be called from the main HTML.
*          Creates an object that can hold the current
*               state of the fade animation for a particular DIV
***********************************************************/
function FadingText(theDiv, numSteps, startColor)
{
FadingObject[theDiv] = new createFaderObject(theDiv, numSteps, startColor);
}
/*****************************************************************
* Function    : start_fading
*
* Description : If the FadeAnimation loop is not currently running
*          then it is started.
*****************************************************************/
function start_fading()
{
if(!FadeRunning)
FadeAnimation();
}
/*****************************************************************
* Function    : set_text
*
* Description : In the new W3C DOM model we need only set the text
*   once, after that we can just change the colour
*****************************************************************/
function set_text(f)
{
if(navigator.appName.indexOf("Netscape") != -1
&& document.getElementById)
{
var theElement = document.getElementById(f.name);
var newRange   = document.createRange();
newRange.setStartBefore(theElement);
var strFrag    = newRange.createContextualFragment(f.text);
while (theElement.hasChildNodes())
theElement.removeChild(theElement.lastChild);
theElement.appendChild(strFrag);
theElement.style.color="#"+f.startColor;
}
}
/*****************************************************************
*
* Function   : getColor
*
* Parameters : f - the fade object for which to calculate the colour.
*
* Description: Calculates the color of the link depending on
*         how far through the fade we are.
*
*****************************************************************/
function getColor(f)
{
var r=hex2dec(f.color.slice(0,2));
var g=hex2dec(f.color.slice(2,4));
var b=hex2dec(f.color.slice(4,6));
r2= Math.floor(f.r+(f.index*(r-f.r))/(f.steps) + .5);
g2= Math.floor(f.g+(f.index*(g-f.g))/(f.steps) + .5);
b2= Math.floor(f.b+(f.index*(b-f.b))/(f.steps) + .5);
return("#" + dec2hex(r2) + dec2hex(g2) + dec2hex(b2));
}
/*****************************************************************
*
* Function   : setColor
*
* Parameters : fadeObj   - The TextFader object to set
*
* Description: Gets the color of the text and writes it to
*         the DIV.
*
*****************************************************************/
function setColor(fadeObj)
{
var theColor=getColor(fadeObj);
var str="<FONT COLOR="+ theColor + ">" + fadeObj.text + "</FONT>";
var theDiv=fadeObj.name;
//if IE 4+
if(document.all)
{
document.all[theDiv].innerHTML=str;
}
//else if NS 4
else if(document.layers)
{
document.nscontainer.document.layers[theDiv].document.write(str);
document.nscontainer.document.layers[theDiv].document.close();
}
//else if NS 6 (supports new DOM, may work in IE5) - see Website Abstraction for more info.
//http://www.wsabstract.com/javatutors/dynamiccontent4.shtml
else if (document.getElementById)
{
theElement = document.getElementById(theDiv);
theElement.style.color=theColor;
}
}
/*****************************************************************
*
* Function   : fade_up
*
* Parameters : theDiv  - The div in which to display the text
*         newText - The text to display when faded in
*         newColor- The color the text will be.
*
* Description: Depending on the current "state" of the fade
*         this function will determine the new state and
*         if neccessary, start the fade effect.
*
*****************************************************************/
function fade_up(theDiv, newText, newColor)
{
var f=FadingObject[theDiv];
if(newColor == null)
newColor="FFFFFF";
if(f.state == "OFF")
{
f.text  = newText;
f.color = newColor;
f.state = "FADE_UP";
set_text(f);
start_fading();
}
else if( f.state == "FADE_UP_DOWN"
|| f.state == "FADE_DOWN"
|| f.state == "FADE_DOWN_UP")
{
if(newText == f.text)
f.state = "FADE_UP";
else
{
f.next_text  = newText;
f.next_color = newColor;
f.state      = "FADE_DOWN_UP";
}
}
}
/*****************************************************************
*
* Function   : fade_down
*
* Parameters : theDiv  - The div in which to display the text
*
* Description: Depending on the current "state" of the fade
*         this function will determine the new state and
*         if neccessary, start the fade effect.
*
*****************************************************************/
function fade_down(theDiv)
{
var f=FadingObject[theDiv];
if(f.state=="ON")
{
f.state="FADE_DOWN";
start_fading();
}
else if(f.state=="FADE_DOWN_UP")
{
f.state="FADE_DOWN";
f.next_text = null;
}
else if(f.state == "FADE_UP")
{
f.state="FADE_UP_DOWN";
}
}
/*******************************************************************
*
* Function    : Animate
*
* Description : This function is based on the Animate function
*          of animate.js (animated rollovers).
*          Each fade object has a state. This function
*          modifies each object and changes its state.
*****************************************************************/
function FadeAnimation()
{
FadeRunning = false;
for (var d in FadingObject)
{
var f=FadingObject[d];
if(f.state == "FADE_UP")
{
if(f.index < f.steps)
f.index++;
else
f.index = f.steps;
setColor(f);
if(f.index == f.steps)
f.state="ON";
else
FadeRunning = true;
}
else if(f.state == "FADE_UP_DOWN")
{
if(f.index < f.steps)
f.index++;
else
f.index = f.steps;
setColor(f);
if(f.index == f.steps)
f.state="FADE_DOWN";
FadeRunning = true;
}
else if(f.state == "FADE_DOWN")
{
if(f.index > 0)
f.index--;
else
f.index = 0;
setColor(f);
if(f.index == 0)
f.state="OFF";
else
FadeRunning = true;
}
else if(f.state == "FADE_DOWN_UP")
{
if(f.index > 0)
f.index--;
else
f.index = 0;
setColor(f);
if(f.index == 0)
{
f.text      = f.next_text;
f.color     = f.next_color;
f.next_text = null;
f.state     ="FADE_UP";
set_text(f);
}
FadeRunning = true;
}
}
/*** Check to see if we need to animate any more frames. ***/
if(FadeRunning)
setTimeout("FadeAnimation()", FadeInterval);
}</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
/*
* FadingText(divName, numSteps, BGColor)
* divName : Must match the DIV names defined at the end of the BODY)
* numSteps: The number of steps in the fading transition
* BGColor : The background colour of the DIV or document.
*/
FadingText('fade1', 10,"FFFFFF");
/*** The "Frame Interval" Smaller = faster ***/
FadeInterval=30;
</SCRIPT>
</HEAD>
<BODY>
<p><A HREF="
http://www.html-kodlari.tr.gg" onMouseOver="fade_up('fade1','<FONT SIZE=4 FACE=Verdana>Türkiyenin Yeni Interactive Sitesi</FONT>','000000')" onMouseOut="fade_down('fade1')">HTML-KODLARI.Tr.GG Türkiyenin Yeni Interactive Sitesi</A>
<p><A HREF="
http://www.e-dersane.com" onMouseOver="fade_up('fade1','<FONT SIZE=4 FACE=Verdana>Web tasarımcıları için bulunmaz bir site</FONT>','000000')" onMouseOut="fade_down('fade1')">E-dersane</A>
<p><A HREF="
http://www.ntvmsnbc.com" onMouseOver="fade_up('fade1','<FONT SIZE=4 FACE=Verdana>Türkiye'nin haber portalı</FONT>','000000')" onMouseOut="fade_down('fade1')">Ntvmsnbc</A>
<script language="JavaScript1.2">
if (document.layers){
document.write('<ilayer name="nscontainer" width="100%" height="100">')
document.write('<layer name="fade1" width="100%" height="100">')
document.write('</layer></ilayer>')
}
else
document.write('<DIV ID="fade1"></DIV>')
</script>
</BODY>
</HTML>

Açılır Menü
<Html><Head><Title>www.html-kodlari.tr.gg</title><html><head><meta http-equiv="Content-Language" content="tr"><meta http-equiv="Content-Type" content="text/html; charset=windows-1254"></head></html>
<!-- Bu Sayfa
www.html-kodlari.tr.gg Ürünüdür. -->
<style>BODY{font-family:verdana,arial,helvetica;font-size:70%;} H1{font-size:120%;font-style:italic;}  DIV#divMenuBar{background-color:#6699CC;} TABLE#tblMenuBar TD{font-size:60%;color:white;padding:0px 5px 0px 5px;cursor:default;} TABLE#tblMenuBar TD.MenuMadde{font-weight:bold;cursor:hand;}  DIV.clsMenu{  font-size:90%;background-color:#6699CC;  position:absolute;visibility:hidden;width:130px;  padding:5px 5px 5px 8px;border-top:1 white solid; } DIV.clsMenu A{text-decoration:none;color:white;font-weight:bold;} DIV.clsMenu A:hover{color:moccasin;} BUTTON{font-family:tahoma;font-size:100%;}</style>
<SCRIPT LANGUAGE="Javascript">
var eOpenMenu = null;
function OpenMenu(eSrc,eMenu)
{
eMenu.style.left = eSrc.offsetLeft + divMenuBar.offsetLeft;
eMenu.style.top = divMenuBar.offsetHeight + divMenuBar.offsetTop;
eMenu.style.visibility = "visible";
eOpenMenu = eMenu;
}
function CloseMenu(eMenu)
{
eMenu.style.visibility = "hidden";
eOpenMenu = null;
}
function document.onmouseover()
{
var eSrc = window.event.srcElement;
if ("MenuMadde" == eSrc.className)
{
eSrc.style.color = "moccasin";
var eMenu = document.all[eSrc.id.replace("tdMenuBarItem","divMenu")];
if (eOpenMenu && eOpenMenu != eMenu)
{
CloseMenu(eOpenMenu);
}
if (eMenu)
{
OpenMenu(eSrc,eMenu);
}
}
else if (eOpenMenu && !eOpenMenu.contains(eSrc) && !divMenuBar.contains(eSrc))
{
CloseMenu(eOpenMenu);
}
}
function document.onmouseout()
{
var eSrc = window.event.srcElement;
if ("MenuMadde" == eSrc.className)
{
eSrc.style.color = "";
}
}
</SCRIPT>
</HEAD>
<BODY>
<DIV ID="divMenuBar">
<TABLE ID="tblMenuBar" BORDER="0">
<TR>
<TD CLASS="MenuMadde" ID="tdMenuBarItem01">MENÜ MADDE 01</TD>
<TD>|</TD>
<TD CLASS="MenuMadde" ID="tdMenuBarItem02">MENÜ MADDE 02</TD>
<TD>|</TD>
<TD CLASS="MenuMadde" ID="tdMenuBarItem03">MENÜ MADDE 03</TD>
</TR>
</TABLE>
</DIV>
<DIV CLASS="clsMenu" ID="divMenu01">
<DIV CLASS="clsMenuAra"></DIV>
<DIV><A TARGET="_new" HREF="01.asp">Madde 01</A></DIV>
<DIV><A TARGET="_new" HREF="02.asp">Madde 02</A></DIV>
<DIV><A TARGET="_new" HREF="03.asp">Madde 03</A></DIV>
<DIV><A TARGET="_new" HREF="04.asp">Madde 04</A></DIV>
<DIV><A TARGET="_new" HREF="05.asp">Madde 05</A></DIV>
</DIV>
<DIV CLASS="clsMenu" ID="divMenu02">
<DIV CLASS="clsMenuAra"></DIV>
<DIV><A TARGET="_new" HREF="11.asp">Madde 01</A></DIV>
<DIV><A TARGET="_new" HREF="12.asp">Madde 02</A></DIV>
<DIV><A TARGET="_new" HREF="13.asp">Madde 03</A></DIV>
<DIV><A TARGET="_new" HREF="14.asp">Madde 04</A></DIV>
<DIV><A TARGET="_new" HREF="15.asp">Madde 05</A></DIV>
</DIV>
<DIV CLASS="clsMenu" ID="divMenu03">
<DIV CLASS="clsMenuAra"></DIV>
<DIV><A TARGET="_new" HREF="21.asp">Madde 01</A></DIV>
<DIV><A TARGET="_new" HREF="22.asp">Madde 02</A></DIV>
<DIV><A TARGET="_new" HREF="23.asp">Madde 03</A></DIV>
<DIV><A TARGET="_new" HREF="24.asp">Madde 04</A></DIV>
<DIV><A TARGET="_new" HREF="25.asp">Madde 05</A></DIV>
</DIV>
</BODY>
</HTML>

Açılış Scripti
<Html><Head><Title>www.html-kodlari.tr.gg</title><html><head><meta http-equiv="Content-Language" content="tr"><meta http-equiv="Content-Type" content="text/html; charset=windows-1254"></head></html>
<!-- Bu Sayfa
www.html-kodlari.tr.gg Ürünüdür. -->
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function expandingWindow(website) {
// Dikine açılma hizi (Yüksek değer=hızlı)
var heightspeed = 2;
// Genişlemesine açılma hizi (Yüksek değer=hızlı)
var widthspeed = 7;
// Soldan Kaç Piksel solda görünecek
var leftdist = 0;
// Yukarıdan Kaç Piksel aşağıda görünecek
var topdist = 0;
if (document.all) {
var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes, location=yes, status=yes, toolbar=yes,menubar=yes");
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
sizer.resizeTo("1", sizeheight);
}
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
sizer.resizeTo(sizewidth, sizeheight);
}
sizer.location = website;
}
else
window.location = website;
}
//  End -->
</script>
</head>
<body>
<a href="#" onclick="expandingWindow('test.htm'); return false">Pencereyi Aç</a>

Adınızın Japoncası
<Html><Head><Title>www.html-kodlari.tr.gg</title><html><head><meta http-equiv="Content-Language" content="tr"><meta http-equiv="Content-Type" content="text/html; charset=windows-1254"></head></html>
<!-- Bu Sayfa
www.html-kodlari.tr.gg Ürünüdür. -->
<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Momoko Sakura -->
<!-- Begin
function isvowel(v) {
if ((v == "a") || (v == "e") || (v == "i") || (v == "o") || (v == "u")) {
return true;
}
else {
return false;
}
}
function toJapanese(inp) {
name1 = inp;
otp = "";
cnt = 0;
k = "";
l = "";
inp = inp.toLowerCase();
while (cnt <= inp.length - 1) {
k = inp.charAt(cnt);
if ((cnt + 1) > (inp.length - 1)) {
l = "u";
}
else {
l = inp.charAt(cnt+1);
}
if ((k == " ") || (k == "-") || (k == "'")) {
otp = otp + k;
cnt += 1;
}
if ((l == "y") && (!isvowel(k))) {
l = "i";
}
if (k == "x") {
if (cnt == 0) {
k = "z";
}
else {
k = "k";
}
}
if (k == "g") {
if ((l == "e") || (l == "i") || (l == "y")) {
k = "j";
}
else {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + k + "u";
cnt += 1;
}
}
}
if (k == "j") {
if ((l == "a") || (l == "u") || (l == "o")) {
otp = otp + k + l;
cnt +=2;
}
if ((l == "e") || (l == "i")) {
otp = otp + "ji";
cnt += 2;
}
}
if (k == "y") {
if ((l == "a") || (l == "u") || (l == "o")) {
otp = otp + k + l;
cnt += 2;
}
else {
k = "i";
}
}
if (k == "m") {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
if ((l == "b") || (l == "m") || (l == "p")) {
otp = otp + "n";
cnt += 1;
}
else {
otp = otp + "mu";
cnt += 1;
}
}
}
if (isvowel(k) || ((k == "n") && (!isvowel(l)))) {
otp = otp + k;
cnt = cnt + 1;
}
if (k == "q") {
k = "k";
}
if (k == "v") {
k = "b";
}
if (k == "l") {
k = "r";}
if (k == "c") {
if (l == "h") {
otp = otp + "chi";
cnt += 3;
}
else {
if ((l == "e") || (l == "i") || (l == "y")) {
k = "s";
}
else {
k = "k";
}
}
}
if (k == "w") {
if ((l == "a") || (l == "o")) {
otp = otp + k + l;
cnt += 2;
}
else {
if ((l == "i") || (l=="e")) {
otp = otp + "u" + l;
cnt += 2;
}
else {
k = "b";
}
}
}
if ((k == "b") || (k == "k") || (k == "r")) {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + k + "u";
cnt += 1;
}
}
if (k == "d") {
if ((l == "i") || (l == "a") || (l == "e")) {
otp = otp + "de";
cnt += 2;
}
if ((l == "u") || (l == "o")) {
otp = otp + "do";
cnt += 2;
}
if (!isvowel(l)) {
otp = otp + "de";
cnt += 1;
}
}
if (k == "f") {
otp = otp + "fu";
cnt += 1;
if (isvowel(l)) {
cnt += 1;
}
}
if (k == "h") {
if (l == "u") {
otp = otp + "fu";
cnt += 2;
}
else {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "fu";
cnt += 1;
}
}
}
if (k == "z") {
if (l == "i") {
k = "j";
}
else {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "zu";
cnt += 1;
}
}
}
if (k == "n") {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
}
if (k == "p") {
if (l == "h") {
otp = otp + "fu";
cnt += 2;
}
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "pu";
cnt += 1;
}
}
if (k == "s") {
if ((l == "i") || (l == "h")) {
otp = otp + "shi";
cnt += 2;
if (l == "h") {
cnt += 1;
}
}
else {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "su";
cnt += 1;
}
}
}
if (k == "t") {
if ((l == "a") || (l == "e") || (l == "o")) {
otp = otp + k + l;
cnt += 2;
}
if ((l == "u") || ((!isvowel(l)) && (!(l == "h")))) {
otp = otp + "tsu";
cnt += 1;
if (l == "u") {
cnt += 1;
}
if ((l == "s") && (inp.charAt(cnt + 1) == "u")) {
cnt += 2;
}
}
if (l == "i") {
otp = otp + "chi";
cnt += 2;
}
if (l == "h") {
otp = otp + "fu";
cnt += 3;
}
}
}
name2 = "" + otp.charAt(0).toUpperCase();
for (j = 1; j <= otp.length - 1; j++) {
name2 += otp.charAt(j);
}
alert(name1 + " isminin japonca telaffuzu: "" + name2 + """);
}
//  End -->
</script>
<title>z-japonca_tel</title></HEAD>
<BODY>
<center>
<form>
İsminiz:  <input type=text name="personname" size=15>
<input type=button value="Japonca telaffuzu!" onClick="toJapanese(this.form.personname.value);">
</form>
</center>
</BODY>
</HTML>

 
  Bugün 18 ziyaretçi (315 klik) kişi burdaydı! aÇıLıŞ TaRiHi: 26.06.2008 Copyright 2008 KeYiF-BuRaDa.Tr.Cx /! !! WéB'iN KaLBi !! /! BiLGiuBLiC BiLGi CuMHuRiYéTi  
 
Online Sayac
Image Hosted by ImageShack.us

Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol