Son Değiştirilme04:44:11 PM GMT

Başlıklar
PROGRAMLAR > JAVASCRIPT > Javascripte Açılır Menü ve Slide Yazı

Javascripte Açılır Menü ve Slide Yazı

e-Posta Yazdır PDF
( 0 - user rating )

Açılır Münü

 

<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function jumpBox(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
//-->
</SCRIPT>
</head>
<body>
<FORM NAME="form">
<SELECT NAME="site" size=1 onChange="javascript:jumpBox()">
<OPTION VALUE="">Menü
<OPTION VALUE="http://www.yazilim-arsivi.net">yazilim-arsivi.net
<OPTION VALUE="http://www.blog.yazilim-arsivi.net">blog.yazilim-arsivi.net
</SELECT>
</FORM>
</body>
</html>
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function jumpBox(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
//-->
</SCRIPT>
</head>
<body>
<FORM NAME="form">
<SELECT NAME="site" size=1 onChange="javascript:jumpBox()">
<OPTION VALUE="">Menü
<OPTION VALUE="http://www.yazilim-arsivi.net">yazilim-arsivi.net
<OPTION VALUE="http://www.blog.yazilim-arsivi.net">blog.yazilim-arsivi.net
</SELECT>
</FORM>
</body>
</html>
Slide Yazı
<script type="text/javascript"><!--
var h1Cols = ['#FFFFFF', '#DDDDDD', '#BBBBBB', '#999999', '#777777', '#555555'];
var h1Arr = [];
function h1Setup()
{
h1Arr = document.getElementsByTagName('h1');
for (var h = 0; h < h1Arr.length; h++)
{
var h1 = h1Arr[h], text = h1.firstChild.nodeValue;
h1.removeChild(h1.firstChild);
h1.animNodes = [];
for (var i = 0; i < text.length; i++)
{
var span = document.createElement('span');
span.appendChild(document.createTextNode(text.substring(i, i+1)));
h1.appendChild(span);
h1.animNodes[h1.animNodes.length] = span;
}
h1.animCount = 0;
h1.animTimer = setInterval('h1Anim(' + h + ')', 50);
}
};
function h1Anim(h)
{
var h1 = h1Arr[h], c = h1.animCount++, noAnim = 1;
for (var i = 0; i < h1.animNodes.length; i++)
{
var s = h1.animNodes[i], frac = Math.max(0, Math.min(1, (c-i)/10)),
marg = document.all && !window.opera ? 'marginRight' : 'marginLeft';
if (s.animDone) continue;
noAnim = 0;
s.style.color = h1Cols[Math.floor(frac * 0.99999 * h1Cols.length)];
if (frac == 1)
{
s.style[marg] = '0';
s.animDone = 1;
}
else s.style[marg] = 0.6*(1-frac) + 'em';
}
if (noAnim) clearInterval(h1.animTimer);
h1.style.visibility = 'inherit';
};
if (document.documentElement)
{
document.write('<style type="text/css"> h1 { visibility: hidden } </style>');
var h1aOL = window.onload;
window.onload = function()
{
if (h1aOL) h1aOL();
h1Setup();
}
}
--></script>
<body>
<h1>www.yazilim-arsivi.net</h1>
</body>

 

Yorumlar (0)

Yorum yaz
daha küçük | daha büyük