ОсновноеRadiotalkПользовательское
MPCHAT - CMS хостинг чатов для профессионалов
90   •   Посмотреть все темы

JavaScript - Скрипты

 

161
band-girl @band-girl
Фон с падующими сердечками:
<script LANGUAGE="JavaScript">
<!-- Begin
var no = 12; // number of hearts
var speed = 10; // smaller number moves the hearts faster
var heart = "../gif/heart.gif";
var flag;
var ns4up = (document.layers) ? 1 : 0; &nbsp;// browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp; &nbsp; &nbsp;// coordinate and position variables
var am, stx, sty; &nbsp;// amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
amx = new Array();
amy = new Array();
stx = new Array();
sty = new Array();
flag = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// set coordinate variables
xp[i] = Math.random()*(doc_width-30)+10; &nbsp;// set position variables
yp[i] = Math.random()*doc_height;
amy[i] = 12+ Math.random()*20; &nbsp; &nbsp; &nbsp; &nbsp; // set amplitude variables
amx[i] = 10+ Math.random()*40;
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); &nbsp; &nbsp; // set step variables
flag[i] = (Math.random()>0.5)?1:0;
if (ns4up) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(heart+ "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(heart+ "\" border=\"0\"></layer>");
}
} else
if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(heart+ "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(heart+ "\" border=\"0\"></div>");
}
}
}
function snowNS() { &nbsp;// Netscape main animation function
for (i = 0; i < no; ++ i) { &nbsp;// iterate for every dot
if (yp[i] > doc_height-50) {
xp[i] = 10+ Math.random()*(doc_width-amx[i]-30);
yp[i] = 0;
flag[i]=(Math.random()<0.5)?1:0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
if (flag[i])
dx[i] += stx[i];
else
dx[i] -= stx[i];
if (Math.abs(dx[i]) > Math.PI) {
yp[i]+=Math.abs(amy[i]*dx[i]);
xp[i]+=amx[i]*dx[i];
dx[i]=0;
flag[i]=!flag[i];
}
document.layers["dot"+i].top = yp[i] + amy[i]*(Math.abs(Math.sin(dx[i])+dx[i]));
document.layers["dot"+i].left = xp[i] + amx[i]*dx[i];
}
setTimeout("snowNS()", speed);
}
function snowIE() { &nbsp;// IE main animation function
for (i = 0; i < no; ++ i) { &nbsp;// iterate for every dot
if (yp[i] > doc_height-50) {
xp[i] = 10+ Math.random()*(doc_width-amx[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
flag[i]=(Math.random()<0.5)?1:0;
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
if (flag[i])
dx[i] += stx[i];
else
dx[i] -= stx[i];
if (Math.abs(dx[i]) > Math.PI) {
yp[i]+=Math.abs(amy[i]*dx[i]);
xp[i]+=amx[i]*dx[i];
dx[i]=0;
flag[i]=!flag[i];
}
document.all["dot"+i].style.pixelTop = yp[i] + amy[i]*(Math.abs(Math.sin(dx[i])+dx[i]));
document.all["dot"+i].style.pixelLeft = xp[i] + amx[i]*dx[i];
}
setTimeout("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
// End -->
</script>


Передвижение объяекта:
<html>
<head>
<title>JavaScript. Позиционирование.</title>
<script language="JavaScript">
<!--
var hor=0;
var ver=0;
// step = величина шага в пикселях
var step=50;
function right () {
move.left= hor+=step;
}
function left () {
move.left = hor-=step;
}
function down () {
move.top = ver+=step;
}
function up () {
move.top = ver-=step;
}
function upright () {
move.top = ver-=step;
move.left = hor+=step;
}
function upleft () {
move.top = ver-step;
move.left = hor-step;
}
function downleft () {
move.top = ver+=step;
move.left= hor-=step;
}
function downright () {
move.top = ver+=step;
move.left = hor+=step;
}
function begin () {
move.top = ver=0;
move.left = hor=0;
}
-->
</script>
</head>
<body background="bg1.jpg" bgproperties="fixed" style="background-repeat: no-repeat;r" &nbsp;text="#800000" link="#8000FF" alink="#DC5912" vlink="#9B4E00">
<br><br><center><div id="move" style="position:relative; left:0px; top:0px; width:88px; height:31px"><img src="../gif/heart.gif" width="33" height="30" border="0"></div></center><br>
<script language="JavaScript">
<!--
var NN = (navigator.appName == "Netscape");
var move = (NN) ? document.move : document.all.move.style;
-->
</script>
<form><center>
<input type="button" value="Влево-Вверх" onclick="upleft();">
<input type="button" value="Вверх" onclick="up();">
<input type="button" value="Вправо-Вверх" onclick="upright();"><br>
<input type="button" value="Влево" onclick="left();">
<input type="button" value="Исходная позиция" onclick="begin();">
<input type="button" value="Вправо" onclick="right();"><br>
<input type="button" value="Влево-Вниз" onclick="downleft();">
<input type="button" value="Вниз" onclick="down();">
<input type="button" value="Вправо-Вниз" onclick="downright();">
</center></form>
</body>
</html>


При каждой загрузки новая музыка:
<html>
<head>
<title>Музыкальная шкатулка, при каждой загрузке новая музыка</title>
</head>
<body>
<script>
//<!--
var midi = ""
var txt = ""
var nummidis = 5
day = new Date()
seed = day.getTime()
ran = parseInt(((seed - (parseInt(seed/1000,10) * 1000))/10)/100*nummidis
+ 1,10)
if (ran == (1))
{midi=("herbst.mid");
txt=("herbst.mid")}
if (ran == (2))
{midi=("baby.mid");
txt=("baby.mid")}
if (ran == (3))
{midi=("gemeinde.mid");
txt=("gemeinde.mid")}
if (ran == (4))
{midi=("ost.mid");
txt=("ost.mid")}
if (ran == (5))
{midi=("shark.mid");
txt=("shark.mid")}
/*
Для Netscape - отключено - надо ? уберите тег комментария..
document.write('<center><embed src="' + midi + '" AUTOSTART=true HIDDEN=false VOLUME=100 WIDTH=200 Height=55 loop=false></embed><br><strong>Эта музыка "<font color="red" size=2><em>' + txt + '</em></font></font>"</strong></center>')
*/
document.write('<center><bgsound src="' + midi + '" AUTOSTART=true loop=false></bgsound><strong>Эта музыка "<font color="red"><em>' + txt + '</em></font></font>"</strong></center>')
//-->
</SCRIPT>
</body>
</html>


Проверка правильного ввода илектроного адреса:<html>
<head>
<title>JavaScript в примерах</title>
<script Language="JavaScript">
<!-- //
function showerror() {
alert("Адрес электронной почты был введен неправильно.");
}
function checkmail()
{
txt=document.entermail.address.value;
if (txt == "") {
alert("Введите Адрес электронной почты.");
return(false)
}
if (txt.indexOf(".") == -1) {
alert("Нет символа\".\"");
return(false)
}
dog = txt.indexOf("@");
if (dog == -1) {
alert("Нет символа\"@\".");
return(false)
}
if ((dog < 1) || (dog > txt.length - 5)) {
showerror();
return(false)
}
if ((txt.charAt(dog - 1) == '.') || (txt.charAt(dog + 1) == '.')) {
showerror();
return(false)
}
}
//-->
</script>
<body>
<form method="POST" name="entermail" onSubmit="return checkmail()">
<p><b><small>E-mail:</small></b><br>
<input type="text" name="address" size="20"><br>
<input type="submit" value="Check" name="B1"> * <input type="reset"
value="Clear" name="B2"></p>
</form>
</body>
</html>


Подпрыгивающие слово:
<html>
<head>
<title>Подпрыгивающее слово</title>
<script language="JavaScript">
<!--
var rad = 100;
var xoff = 350;
var yoff = 120;
var pi = Math.PI;
var inc = pi/40;
var pos=0;
function move() {
pos += inc;
if (pos>= pi ) {pos=0;}
obj.left = xoff;
obj.top = -(rad * Math.sin(pos)) + yoff; &nbsp;
setTimeout("move()", 50);
}
-->
</script>
</head>
<body background="bg1.jpg" bgproperties="fixed" style="background-repeat: no-repeat;r" &nbsp;text="#800000" link="#8000FF" alink="#DC5912" vlink="#9B4E00">
<div id="obj" style="position:absolute; left:400px; top:10px; width:10px; height:31px"><font face="Arial" color="#00cc00"><strong>Прыг!</strong></font></div>
<script language="JavaScript">
<!-- &nbsp;
var NN = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);
var obj = (NN) ? document.obj : document.all.obj.style;
move();
-->
</script>
</body>
</html>


Очень красивая мельница из слов,советую попробывать!:<html>
<head>
<title>Мельница из слов</title>
<script>
<!--
// Edit your messages. You MUST use 6 messages precisly.
var message = new Array()
message[0]=" >>>> SCRIPTIC"
message[1]=" >>>> JAVA APPLET"
message[2]=" >>>> MAKE FRIENDS"
message[3]=" >>>> FALL IN LOVE"
message[4]=" >>>> TAKE IT EASY"
message[5]=" >>>> TRY IT AGAIN"
// Edit the width an height of your TextWheel (pixels)
var scrollerheight=120
var scrollerwidth=360
// Edit the font
var font_family="Verdana"
// Edit the font-size
var font_size=30
// Edit the horizontal and vertical position of your TextWheel (pixels)
var x_textposition=100
var y_textposition=10
function initiate() {
if (document.all) {
&nbsp;document.all.rotationstyle1.style.posLeft=x_textposition
&nbsp;document.all.rotationstyle1.style.posTop=y_textposition
document.all.rotationstyle2.style.posLeft=x_textposition
&nbsp;document.all.rotationstyle2.style.posTop=y_textposition
document.all.rotationstyle3.style.posLeft=x_textposition
&nbsp;document.all.rotationstyle3.style.posTop=y_textposition
document.all.rotationstyle4.style.posLeft=x_textposition
&nbsp;document.all.rotationstyle4.style.posTop=y_textposition
document.all.rotationstyle5.style.posLeft=x_textposition
&nbsp;document.all.rotationstyle5.style.posTop=y_textposition
document.all.rotationstyle6.style.posLeft=x_textposition
&nbsp;document.all.rotationstyle6.style.posTop=y_textposition
setmessages()
&nbsp;}
}
function setmessages() {
&nbsp;rotationstyle1.innerHTML=
'<OBJECT ID="rotationobj1" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+
'<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+
'<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,0)">'+
'<PARAM NAME="Line0003" VALUE="SetFillColor(255,255,0)">'+
'<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+font_size+', 400, 0, 0, 0)">'+
'<PARAM NAME="Line0005" VALUE="Text(\''+message[0]+'\',0, 2, 0)">'+
'</OBJECT>' &nbsp;
rotationstyle2.innerHTML=
'<OBJECT ID="rotationobj2" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+
'<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+
'<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,0)">'+
'<PARAM NAME="Line0003" VALUE="SetFillColor(255,255,0)">'+
'<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+font_size+', 400, 0, 0, 0)">'+
'<PARAM NAME="Line0005" VALUE="Text(\''+message[1]+'\',0, 2, 0)">'+
'</OBJECT>'
rotationstyle3.innerHTML=
'<OBJECT ID="rotationobj3" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+
'<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+
'<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,0)">'+
'<PARAM NAME="Line0003" VALUE="SetFillColor(255,255,0)">'+
'<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+font_size+', 400, 0, 0, 0)">'+
'<PARAM NAME="Line0005" VALUE="Text(\''+message[2]+'\',0, 2, 0)">'+
'</OBJECT>'
rotationstyle4.innerHTML=
'<OBJECT ID="rotationobj4" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+
'<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+
'<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,0)">'+
'<PARAM NAME="Line0003" VALUE="SetFillColor(255,255,0)">'+
'<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+font_size+', 400, 0, 0, 0)">'+
'<PARAM NAME="Line0005" VALUE="Text(\''+message[3]+'\',0, 2, 0)">'+
'</OBJECT>'
rotationstyle5.innerHTML=
'<OBJECT ID="rotationobj5" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+
'<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+
'<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,0)">'+
'<PARAM NAME="Line0003" VALUE="SetFillColor(255,255,0)">'+
'<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+font_size+', 400, 0, 0, 0)">'+
'<PARAM NAME="Line0005" VALUE="Text(\''+message[4]+'\',0, 2, 0)">'+
'</OBJECT>'
rotationstyle6.innerHTML=
'<OBJECT ID="rotationobj6" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+
'<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+
'<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,0)">'+
'<PARAM NAME="Line0003" VALUE="SetFillColor(255,255,0)">'+
'<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+font_size+', 400, 0, 0, 0)">'+
'<PARAM NAME="Line0005" VALUE="Text(\''+message[5]+'\',0, 2, 0)">'+
'</OBJECT>'
rotationobj1.Rotate(0,0,0)
&nbsp;rotationobj2.Rotate(0,60,0)
&nbsp;rotationobj3.Rotate(0,120,0)
&nbsp;rotationobj4.Rotate(0,180,0)
&nbsp;rotationobj5.Rotate(0,240,0)
&nbsp;rotationobj6.Rotate(0,300,0)
&nbsp;
&nbsp;startscroll()
}
function startscroll() {
rotationobj1.Rotate(1,2,0)
&nbsp;rotationobj2.Rotate(1,2,0)
&nbsp;rotationobj3.Rotate(1,2,0)
&nbsp;rotationobj4.Rotate(1,2,0)
&nbsp;rotationobj5.Rotate(1,2,0)
&nbsp;rotationobj6.Rotate(1,2,0)
&nbsp;timer=setTimeout("startscroll()",20)
}
// - End of JavaScript - -->
</script>
</head>
<body onLoad="initiate()">
<SPAN ID="rotationstyle1" STYLE="position:absolute">
<OBJECT ID="rotationobj1" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">
</OBJECT>
</SPAN>
<SPAN ID="rotationstyle2" STYLE="position:absolute">
<OBJECT ID="rotationobj2" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">
</OBJECT>
</SPAN>
<SPAN ID="rotationstyle3" STYLE="position:absolute">
<OBJECT ID="rotationobj3" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">
</OBJECT>
</SPAN>
<SPAN ID="rotationstyle4" STYLE="position:absolute">
<OBJECT ID="rotationobj4" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">
</OBJECT>
</SPAN>
<SPAN ID="rotationstyle5" STYLE="position:absolute">
<OBJECT ID="rotationobj5" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">
</OBJECT>
</SPAN>
<SPAN ID="rotationstyle6" STYLE="position:absolute">
<OBJECT ID="rotationobj6" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">
</OBJECT>
</SPAN>
<DIV id="Belongs_not_to_the_script" style="position:absolute;top:200px;left:5px;">
</DIV>
</body>
</html>

215
Сатана @Сатана
Слово мигающие красным цветом
<a name="1"></a><b>
<center><font size="3"> &nbsp; <!-- BODY START HERE -->
<span id="theText" style="width:100%; color: #Red">
<b><font size="3"color="#000000">Само слово</font>
</span>
<script>
<!--
//âåëè÷èíà ñèÿíèÿ îò è äî
var from = 10;
var to = 30;
//ñêîðñòü ñèÿíèÿ
var delay = 98;
//öâåò ñèÿíèÿ, èìÿ â rgb (ïðèìåð:'blue') èëè èìåíîâàííûé
var glowColor = "Red";
//íå ìåíÿòü!!!
var i = to;
var j = 0;
textPulseDown();
function textPulseUp()
{
if (!document.all)
return
if (i < to)
{
theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
i++;
theTimeout = setTimeout('textPulseUp()',delay);
return 0;
}

if (i = to)
{
theTimeout = setTimeout('textPulseDown()',delay);
return 0;
}
}
function textPulseDown()
{
if (!document.all)
return
if (i > from)
{
theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
i--;
theTimeout = setTimeout('textPulseDown()',delay);
return 0;
}
if (i = from)
{
theTimeout = setTimeout('textPulseUp()',delay);
return 0;
}
}
//-->
</script>

161
band-girl @band-girl
Смена картинки при выборе картинки из списка (select)
<script language="javascript">
<!--// Image Selector
function selectImage(f)
{
if (document.flipForm.which.selectedIndex >= 0)
&nbsp;document.flipForm.flip.src = imageSet[document.flipForm.which.selectedIndex];
}

function SelectorLongNames(width,height,listHeight,images,names)
{
/* si: start index
** i: current index
** ei: end index
** cc: current count
*/
si = 0;
ci=0;
cc=0;
imageSet = new Array();
ei = images.length;
for (i=1;i<ei;i++) {
if (images.charAt(i) == ' ' || images.charAt(i) == ',') {
imageSet[cc] = images.substring(si,i);
cc++;
si=i+1; &nbsp; }
}
currentFlip = 0;
si = 0;
ci=0;
cc=0;
nameSet = new Array();
ei = names.length;
for (i=1;i<ei;i++) {
if (names.charAt(i) == ',') {
nameSet[cc] = names.substring(si,i);
cc++;
si=i+1;
}
}
&nbsp;currentFlip = 0;
&nbsp;// should check nameSet.length == imageSet.length
&nbsp;document.writeln("<FORM name=flipForm>");
&nbsp;document.writeln("<table border=0><tr><td>");
&nbsp;document.write("<img name='flip'");
&nbsp;if (width >0)
&nbsp; &nbsp;document.write("width="+width);
&nbsp;if (height >0)
&nbsp; &nbsp;document.write(" height=" +height);
&nbsp;document.writeln(" src=" +imageSet[0]+ ">");
&nbsp;document.writeln("</td></tr><tr><td>");
&nbsp;document.write("<Select");
&nbsp;if (listHeight > 0)
&nbsp; &nbsp;document.write(" size="+listHeight);
&nbsp;document.write(" name='which' onChange='selectImage(this.form)'>");
for (i=0;i<imageSet.length;i++)
if (i<nameSet.length)
document.write("<OPTION value="+i+">"+nameSet[i]);
else
document.write("<OPTION value="+i+">"+imageSet[i]);
document.writeln("</SELECT>");
document.writeln("</FORM>");
document.writeln("</td></tr></table>");
}
function SelectorLong(width,height,listHeight,images){
SelectorLongNames(width,height,listHeight,images,",");}
function PullDownSelector(width,height,images){
SelectorLongNames(width,height,-1,images,",")}
function PullDownSelectorNames(width,height,images,names){
SelectorLongNames(width,height,-1,images,names)}
// use -1 -1 if you don't know the width and height for the image
function Selector(width,height,images){
listHeight=1; // размеры поля списка Select
SelectorLong(width,height,listHeight,images);
}
// End Script -->
</SCRIPT>
</HEAD>
<body bgcolor="000000" text="#00ff99" link="#00ff00" alink="#99ff00" vlink="#00cc00">
<iframe src="../menu.htm" align="left" width="140" height="560" scrolling="no" frameborder="0"></iframe>
<P>
<script>
<!--// длинна, ширина, адреса картинок.
Selector(468,60,"../banner/gold468x60.gif ../banner/metal468x60.gif ../banner/metal-468x60.gif ");
// &nbsp;-->
</SCRIPT>
:


Передвижение объекта,с выбором:<html>
<head>
<title>JavaScript. Позиционирование.</title>
<script language="JavaScript">
<!--
var hor=0;
var ver=0;
// step = величина шага в пикселях
var step=50;
function right () {
move.left= hor+=step;
}
function left () {
move.left = hor-=step;
}
function down () {
move.top = ver+=step;
}
function up () {
move.top = ver-=step;
}
function upright () {
move.top = ver-=step;
move.left = hor+=step;
}
function upleft () {
move.top = ver-step;
move.left = hor-step;
}
function downleft () {
move.top = ver+=step;
move.left= hor-=step;
}
function downright () {
move.top = ver+=step;
move.left = hor+=step;
}
function begin () {
move.top = ver=0;
move.left = hor=0;
}
-->
</script>
</head>
<body background="bg1.jpg" bgproperties="fixed" style="background-repeat: no-repeat;r" &nbsp;text="#800000" link="#8000FF" alink="#DC5912" vlink="#9B4E00">
<br><br><center><div id="move" style="position:relative; left:0px; top:0px; width:88px; height:31px"><img src="../gif/heart.gif" width="33" height="30" border="0"></div></center><br>
<script language="JavaScript">
<!--
var NN = (navigator.appName == "Netscape");
var move = (NN) ? document.move : document.all.move.style;
-->
</script>
<form><center>
<input type="button" value="Влево-Вверх" onclick="upleft();">
<input type="button" value="Вверх" onclick="up();">
<input type="button" value="Вправо-Вверх" onclick="upright();"><br>
<input type="button" value="Влево" onclick="left();">
<input type="button" value="Исходная позиция" onclick="begin();">
<input type="button" value="Вправо" onclick="right();"><br>
<input type="button" value="Влево-Вниз" onclick="downleft();">
<input type="button" value="Вниз" onclick="down();">
<input type="button" value="Вправо-Вниз" onclick="downright();">
</center></form>
</body>
</html>

215
Сатана @Сатана
Бегущий текст в рамка с возможностью выбора скорости!(очень красиво!)
<html>
<head>
<title>WOweb.ru - Scripts - JavaScript - Ranning Messages</title>
<META http-equiv="Content-Type" content="text/html; charset=windows-1251">
<Style>
&nbsp; A:Link{ Color: #000000; Text-decoration: underline}
&nbsp; A:Visited{ Color: #000000; Text-decoration: underline}
&nbsp; A:Hover{ Color: #000000; Text-decoration: none}
td, body {font-family: verdana, arial, helvetica; font-size:11px;} &nbsp;
</Style>

<!-- HEAD START HERE -->

<script LANGUAGE="JavaScript">
<!--

// Your messages. Add as many as you like
var message=new Array()
message[0]="ГЛАВНАЯ СТРАНИЦА: collections, tricks, tutorials, CLICK HERE."
message[1]="ФОРУМ: спросите у автора, напишите свое мнение о сайте. CLICK HERE."
message[2]="О СКРИПТЕ: можно использовать как меню, регулятор скорости прокрутки. CLICK HERE."


// the URLs of your messages
var messageurl=new Array()
messageurl[0]="http://www.woweb.ru"
messageurl[1]="http://www.woweb.ru"
messageurl[2]="http://www.woweb.ru"

// the targets of the links
// accepted values are '_blank' or '_top' or '_parent' or '_self'
// or the name of your target-window (for instance 'main')
var messagetarget=new Array()
messagetarget[0]="_blank"
messagetarget[1]="_blank"
messagetarget[2]="_blank"

// font-color of messages
var messagecolor= new Array()
messagecolor[0]="yellow"
messagecolor[1]="lightgreen"
messagecolor[2]="orange"

// font-color of the messagecounter just below the scroller
textcountercolor="white"

// font-size of the messagecounter just below the scroller
textcountersize=7

// distance of the scroller to the left margin of the browser-window (pixels)
var scrollerleft=20

// distance of the scroller to the top margin of the browser-window (pixels)
var scrollertop=20

// speed 1: lower means faster
var pause=20

// speed 2: higher means faster
var step=2

// font-size
var fntsize=8

// font-family
var fntfamily="Arial"

// font-weight: 1 means bold, 0 means normal
var fntweight=1

// do not edit the variables below
var scrollerwidth=368
var scrollerheight=20
var scrollerleft_in=scrollerleft+16
var scrollertop_in=scrollertop+12
var backgroundimagecontent
var clipleft,clipright,cliptop,clipbottom
var i_message=0
var timer
var textwidth
var textcontent=""
var textcountercontent=""
if (fntweight==1) {fntweight="700"}
else {fntweight="100"}

function init() {
gettextcontent()

&nbsp; &nbsp;if (document.all) {
&nbsp;text.innerHTML=textcontent
&nbsp;textcounter.innerHTML=textcountercontent
&nbsp;textwidth=text.offsetWidth
&nbsp;document.all.text.style.posTop=scrollertop_in
&nbsp; &nbsp; &nbsp; &nbsp;document.all.text.style.posLeft=scrollerleft_in+scrollerwidth
&nbsp;document.all.textcounter.style.posTop=scrollertop_in+26
&nbsp; &nbsp; &nbsp; &nbsp;document.all.textcounter.style.posLeft=scrollerleft_in+2
&nbsp;document.all.backgroundimage.style.posTop=scrollertop
&nbsp; &nbsp; &nbsp; &nbsp;document.all.backgroundimage.style.posLeft=scrollerleft

&nbsp;clipleft=0
&nbsp;clipright=0
&nbsp;cliptop=0
&nbsp;clipbottom=scrollerheight
&nbsp;document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
&nbsp; &nbsp; &nbsp; &nbsp;scrolltext()
&nbsp; &nbsp;}
if (document.layers) {
&nbsp;document.text.document.write(textcontent)
&nbsp;document.text.document.close()
&nbsp;document.textcounter.document.write(textcountercontent)
&nbsp;document.textcounter.document.close()
&nbsp;textwidth=document.text.document.width
&nbsp;document.text.top=scrollertop_in
&nbsp;document.text.left=scrollerleft_in+scrollerwidth
&nbsp;document.textcounter.top=scrollertop_in+26
&nbsp;document.textcounter.left=scrollerleft_in+2
&nbsp;document.backgroundimage.top=scrollertop
&nbsp; &nbsp; &nbsp; &nbsp;document.backgroundimage.left=scrollerleft
&nbsp;
&nbsp;document.text.clip.left=0
&nbsp;document.text.clip.right=0
&nbsp;document.text.clip.top=0
&nbsp;document.text.clip.bottom=scrollerheight

&nbsp; &nbsp; &nbsp; &nbsp;scrolltext()
&nbsp; &nbsp;}
}

function scrolltext() {
&nbsp; &nbsp;if (document.all) {
&nbsp;if (document.all.text.style.posLeft>=scrollerleft_in-textwidth) {
&nbsp; document.all.text.style.posLeft-=step
&nbsp; clipright+=step
&nbsp; if (clipright>scrollerwidth) {
&nbsp; &nbsp;clipleft+=step
&nbsp; }
&nbsp; document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
&nbsp;
&nbsp; var timer=setTimeout("scrolltext()",pause)
&nbsp;}
&nbsp;else {
&nbsp; changetext()
&nbsp;}
}
&nbsp; if (document.layers) {
&nbsp;if (document.text.left>=scrollerleft_in-textwidth) {
&nbsp; document.text.left-=step
&nbsp; document.text.clip.right+=step
&nbsp; if (document.text.clip.right>scrollerwidth) {
&nbsp; &nbsp;document.text.clip.left+=step
&nbsp; }
&nbsp; var timer=setTimeout("scrolltext()",pause)
&nbsp;}
&nbsp;else {
&nbsp; changetext()
&nbsp;}
}
}

function changetext() {
&nbsp; &nbsp;i_message++
if (i_message>message.length-1) {i_message=0}
gettextcontent()
if (document.all) {
&nbsp;text.innerHTML=textcontent
&nbsp;textwidth=text.offsetWidth
&nbsp;textcounter.innerHTML=textcountercontent
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;document.all.text.style.posLeft=scrollerleft_in+scrollerwidth
&nbsp;clipleft=0
&nbsp;clipright=0
&nbsp;document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;scrolltext()
}

if (document.layers) {
&nbsp; &nbsp; document.text.document.write(textcontent)
&nbsp;document.text.document.close()
&nbsp;
&nbsp;document.textcounter.document.write(textcountercontent)
&nbsp;document.textcounter.document.close()
&nbsp;
&nbsp;textwidth=document.text.document.width

&nbsp;document.text.left=scrollerleft_in+scrollerwidth
&nbsp;document.text.clip.left=0
&nbsp;document.text.clip.right=0
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;scrolltext()
}
}

function gettextcontent() {
textcontent="<span style='position:relative;font-size:"+fntsize+"pt;font-family:"+fntfamily+";font-weight:"+fntweight+"'>"
textcontent+="<a href="+messageurl[i_message]+" target="+messagetarget[i_message]+">"
textcontent+="<nobr><font color="+messagecolor[i_message]+">"+message[i_message]+"</font></nobr></a></span>"

var i_textcounter=i_message+1
textcountercontent="<span style='position:relative;font-size:"+textcountersize+"pt;font-family:"+fntfamily+";font-weight:"+fntweight+"'>"
textcountercontent+="<nobr><font color="+textcountercolor+">This is message "+i_textcounter+" of "+message.length+"</font></nobr></span>"
}

function changespeed(newspeed) {
&nbsp; &nbsp;if (newspeed=="faster") {
&nbsp;step=step+1
&nbsp;if (step>=20) {step=20}
}
else if (newspeed=="slower") {
&nbsp;step=step-1
&nbsp;if (step<0) {step=0}
}
}

window.onresize=init;

// - End of JavaScript - -->
</SCRIPT>

<STYLE>
A {
text-decoration:none;
}

A:Hover {
text-decoration:underline;
}

body{
overflow-x:hidden;
overflow-y:scroll;
}
</STYLE>

<!-- HEAD END HERE -->




</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0" onLoad="init()">
<center>

<!-- BODY START HERE -->

<DIV ID="backgroundimage" style="position:absolute;left:-2000px"><IMG SRC="textrighttoleftdesign.gif" USEMAP="#textrighttoleft" BORDER=0>
<MAP NAME="textrighttoleft">
&nbsp;<AREA SHAPE=RECT COORDS="271,33,297,54" HREF="#" onClick="changespeed('slower')">
&nbsp;<AREA SHAPE=RECT COORDS="364,33,388,53" HREF="#" onClick="changespeed('faster')">
</MAP></DIV>

<DIV ID="text" style="position:absolute;left:-2000px"></DIV>
<DIV ID="textcounter" style="position:absolute;left:-2000px"></DIV>

<!-- BODY END HERE -->



</body>
</html>


161
band-girl @band-girl
Вращение двух объектов вокруг третьего в противоположных направлениях (по круговым орбитам)

<script language="JavaScript">
<!--
var r = 50;
var xoff = 450;
var yoff = 267;
var pi = Math.PI;
var inc = pi / 30;
var pos=0;
function move() {
pos += inc;
obj1.left = (r * Math.cos(pos)) + xoff-5;
obj1.top = (r * Math.sin(pos)) + yoff-5;
obj2.left = (r *0.75* Math.sin(pos)) + xoff-5;
obj2.top = (r *0.75* Math.cos(pos)) + yoff-5;
setTimeout("move()", 50);
}
-->
</script>
</head>
<body>
<div id="obj1" style="position:absolute; width:10px; height:10px"><img src="../gif/ball3.gif" width=10 height=10 border=0></div><div id="obj2" style="position:absolute; width:10px; height:10px"><img src="../gif/ball2.gif" width=10 height=10 border=0></div><div style="position:absolute; left:430px; top:247px; width:39px; height:42px"><img src="../gif/heart.gif" width="33" height="30" border=0></div>
<script language="JavaScript">
<!--
var NN = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);
var obj1 = (NN) ? document.obj1 : document.all.obj1.style;
var obj2 = (NN) ? document.obj2 : document.all.obj2.style;
move();
-->
</script>


Хороший скрипт колькулятора:<html>
<head>
<title>Калькулятор</title>
</head>
<script language="JavaScript">
<!--
// deklaracja zmiennych
var wynik=0, op=0, nowe=0, nowe2=0, done=1, oset=0, kropka, temp;
function reset(value)
{
document.form1.ekran.value = value;
wynik = 0,
op &nbsp; &nbsp;= 0,
nowe &nbsp;= 0,
nowe2 = 0;
done &nbsp;= 1;
oset &nbsp;= 0;
}
function wspolna(new_temp)
{
kropka = 1;
if(nowe || done) {
nowe = 0;
done = 0;
temp = new_temp;
}
for(var i=0; i<temp.length; i++) if (temp[i]=='.') kropka=0;
}
function button(ktory,ktory2)
{
temp = document.form1.ekran.value;
if(ktory2=='.') {
wspolna('0');
if(kropka) {
temp += ktory2;
document.form1.ekran.value = temp;
oset = 0;
}
}
if(ktory>=0 && ktory<=9) &nbsp;{
wspolna('');
if(temp==0 && kropka==1) temp='';
temp += ktory;
document.form1.ekran.value = temp;
oset = 1;
}
if(ktory2=='-' || ktory2=='+' || ktory2=='/' || ktory2=='*') {
if(nowe) op = ktory2
else {
if(!nowe2) {
op = ktory2;
wynik = temp;
nowe2=1;
}
else {
wynik = eval(wynik + op + temp);
op = ktory2;
document.form1.ekran.value = wynik;
}
oset=0;
nowe = 1;
}
}
if(ktory2=='1/x' ) { wynik = eval(1 / temp); reset(wynik); }
if(ktory2=='sqrt') { wynik = Math.sqrt(temp); reset(wynik); }
if(ktory2=='exp' ) { wynik = Math.exp(temp); reset(wynik); }
if(ktory2=='+/-') &nbsp;document.form1.ekran.value = eval(-temp);
if(ktory2=='=' && oset && op!='0') reset(eval(wynik + op + temp));
if (ktory2=='C') reset(0);
if(document.form1.ekran.value[0] == '.')
document.form1.ekran.value = '0' + document.form1.ekran.value;
}
//-->
</script>
<body>
<center>
<form name="form1">
<table bgColor="#430086">
<tbody>
<tr><td><table bgColor="#430086" border="1" cellPadding="0" cellSpacing="5">
<tbody>
<tr align="middle">
<td colSpan="5"><input name="ekran" value="0" size="20"></td></tr>
<tr align="middle">
<td colSpan="4"><b><font color="#FFFF00">Калькулятор</font></b></td>
<td><input name="C" onclick="button(11,'C')" type="button" value=" &nbsp;C &nbsp;"></td></tr>
<tr align="middle">
<td><input name="7" onclick="button(7 ,'')" type="button" value=" &nbsp;7 &nbsp;"></td>
<td><input name="8" onclick="button(8 ,'')" type="button" value=" &nbsp;8 &nbsp;"></td>
<td><input name="9" onclick="button(9 ,'')" type="button" value=" &nbsp;9 &nbsp;"></td>
<td><input name="/" onclick="button(11,'/')" type="button" value=" &nbsp;/ &nbsp;"></td>
<td><input name="sqrt" onclick="button(11,'sqrt')" type="button" value="sqrt"></td></tr>
<tr align="middle">
<td><input name="4" onclick="button(4,'')" type="button" value=" &nbsp;4 &nbsp;"></td>
<td><input name="5" onclick="button(5,'')" type="button" value=" &nbsp;5 &nbsp;"></td>
<td><input name="6" onclick="button(6,'')" type="button" value=" &nbsp;6 &nbsp;"></td>
<td><input name="*" onclick="button(11,'*')" type="button" value=" * &nbsp;"></td>
<td><input name="exp" onclick="button(11,'exp')" type="button" value="exp"></td></tr>
<tr align="middle">
<td><input name="1" onclick="button(1,'')" type="button" value=" &nbsp;1 &nbsp;"></td>
<td><input name="2" onclick="button(2,'')" type="button" value=" &nbsp;2 &nbsp;"></td>
<td><input name="3" onclick="button(3,'')" type="button" value=" &nbsp;3 &nbsp;"></td>
<td><input name="-" onclick="button(11,'-')" type="button" value=" &nbsp;- &nbsp;"></td>
<td><input name="1/x" onclick="button(11,'1/x')" type="button" value="1/x "></td></tr>
<tr align="middle">
<td><input name="0" onclick="button(0,'')" type="button" value=" &nbsp;0 &nbsp;"></td>
<td><input name="+/-" onclick="button(11,'+/-')" type="button" value=" +/- "></td>
<td><input name="." onclick="button(11,'.')" type="button" value=" &nbsp;, &nbsp;"></td>
<td><input name="+" onclick="button(11,'+')" type="button" value=" &nbsp;+ &nbsp;"></td>
<td><input name="=" onclick="button(11,'=')" type="button" value=" &nbsp;= &nbsp;"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</form>
</body>
</html>

215
Сатана @Сатана
Когда юзер зайдет к Вам на страницу бекграунд начнет менять свой цвет
<html>
<head>
<title>WOweb.ru - JavaScript - Background Changer</title>

<!-- HEAD STARTS HERE -->

<!-- Background Changer
Just make sure you add your Title before this script.
If you change the last line in will give you the rest
of the information for your page (link color,text etc.)
Play with the colors !--> <script>
// Modified by WebmastersOnline

function initArray()
{
&nbsp; this.length = initArray.arguments.length
&nbsp; for (var i = 0; i < this.length; i++)
&nbsp; &nbsp; this[i+1] = initArray.arguments[i]
}

var hexChars = "0123456789ABCDEF";

function Dec2Hex (Dec)
{
&nbsp; var a = Dec % 16;
&nbsp; var b = (Dec - a)/16;
&nbsp; hex = "" + hexChars.charAt(b) + hexChars.charAt(a);
&nbsp; return hex;
}

function bgChanger (begin, end, steps)
{
&nbsp; steps = steps -1;

&nbsp; redA &nbsp; &nbsp; = begin.charAt(0) + begin.charAt(1);
&nbsp; red_valA = parseInt(redA,'16');
&nbsp; redB &nbsp; &nbsp; = end.charAt(0) + end.charAt(1);
&nbsp; red_valB = parseInt(redB,'16');
&nbsp; red_int &nbsp;= ((red_valB - red_valA) / steps) * -1;
&nbsp; grnA &nbsp; &nbsp; = begin.charAt(2) + begin.charAt(3);
&nbsp; grn_valA = parseInt(grnA,'16');
&nbsp; grnB &nbsp; &nbsp; = end.charAt(2) + end.charAt(3);
&nbsp; grn_valB = parseInt(grnB,'16');
&nbsp; grn_int &nbsp;= ((grn_valB - grn_valA) / steps) * -1;
&nbsp; bluA &nbsp; &nbsp; = begin.charAt(4) + begin.charAt(5);
&nbsp; blu_valA = parseInt(bluA,'16');
&nbsp; bluB &nbsp; &nbsp; = end.charAt(4) + end.charAt(5);
&nbsp; blu_valB = parseInt(bluB,'16');
&nbsp; blu_int &nbsp;= ((blu_valB - blu_valA) / steps) * -1;

&nbsp; step = 2;
&nbsp; red = red_valA;
&nbsp; grn = grn_valA;
&nbsp; blu = blu_valA;

&nbsp; document.bgColor = begin;

&nbsp; while ( steps >= step )
&nbsp; {
&nbsp; &nbsp; red -= red_int;
&nbsp; &nbsp; red_round = Math.round(red);
&nbsp; &nbsp; red_hex = Dec2Hex(red);

&nbsp; &nbsp; grn -= grn_int;
&nbsp; &nbsp; grn_round = Math.round(grn);
&nbsp; &nbsp; grn_hex = Dec2Hex(grn);

&nbsp; &nbsp; blu -= blu_int;
&nbsp; &nbsp; blu_round = Math.round(blu);
&nbsp; &nbsp; blu_hex = Dec2Hex(blu);

&nbsp; &nbsp; document.bgColor = red_hex + grn_hex + blu_hex;

&nbsp; &nbsp; step++;
&nbsp; }
&nbsp; document.bgColor = end;
}
</script>

<!-- HEAD ENDS HERE -->

</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000">

<!-- BODY STARTS HERE -->

<script>
<!--
&nbsp; bgChanger("000000","000000",45);
&nbsp; bgChanger("000000","FF0000",45);
&nbsp; bgChanger("FF0000","000000",45);
&nbsp; bgChanger("000000","AA00EE",45);
&nbsp; bgChanger("AA00EE","000000",45);
&nbsp; bgChanger("000000","0000FF",45);
&nbsp; bgChanger("0000FF","000000",45);
&nbsp; bgChanger("000000","36456c",45);
&nbsp; bgChanger("36456c","EDEDED",45);
// -->
</script>

<!-- BODY ENDS HERE -->


</body>
</html>

161
band-girl @band-girl
Снегопад

<script language="JavaScript">
<!-- fall Script by kurt.grigg@virgin.net

Amount=30; //Smoothness! depends on image file size, the smaller the size the more you can use!

//Pre-load your image below!
Image0=new Image();
Image0.src="flake1.gif";
Image1=new Image();
Image1.src="flake2.gif";
Image2=new Image();
Image2.src="flake3.gif";
Image3=new Image();
Image3.src="flake4.gif";
Image4=new Image();
Image4.src="flake5.gif";

grphcs=new Array(5)
grphcs[0]="flake1.gif"
grphcs[1]="flake2.gif"
grphcs[2]="flake3.gif"
grphcs[3]="flake4.gif"
grphcs[4]="flake5.gif"

Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write('<img id="si" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth;
for (i=0; i < Amount; i++){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
Ypos[i] = Math.round(Math.random()*WinHeight);
Xpos[i] = Math.round(Math.random()*WinWidth);
Speed[i]= Math.random()*3+2;
Cstep[i]=0;
Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth;
var hscrll=(document.layers)?window.pageYOffset:document.body.scrollTop;
var wscrll=(document.layers)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i]*Math.sin(90*Math.PI/180);
sx = Speed[i]*Math.cos(Cstep[i]);
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*5+2;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else{
si[i].style.pixelLeft=Xpos[i];
si[i].style.pixelTop=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',10);
}
//-->
</script>

<!-- BODY END HERE -->






</body>
</html>



Прицел.
<

<!-- HEAD START HERE -->
<script>
<!-- Beginning of JavaScript -
var x = -50
var y = -50
var filteractive=0

function filteraktivator(filterstatus) {
&nbsp; filteractive=filterstatus
}

function positionrulers() {
if(document.layers) {
&nbsp;document.vertical.left=x
&nbsp;document.horizontal.top=y
&nbsp; &nbsp; &nbsp; &nbsp;if (filteractive==1) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.vertical2.left=x
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.horizontal2.top=y
&nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; if (filteractive==0) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.vertical2.left=-50
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.horizontal2.top=-50
&nbsp; &nbsp; &nbsp; &nbsp;}
}
if(document.all) {
&nbsp;document.all.vertical.style.posLeft=x
&nbsp;document.all.horizontal.style.posTop=y
&nbsp; &nbsp; &nbsp; &nbsp; if (filteractive==1) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.all.vertical2.style.posLeft=x
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.all.horizontal2.style.posTop=y
&nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp; if (filteractive==0) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.all.vertical2.style.posLeft=-50
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.all.horizontal2.style.posTop=-50
&nbsp; &nbsp; &nbsp; &nbsp;}
}
&nbsp; &nbsp;timer =setTimeout("positionrulers()",20)
}

function handlerMM(e){
x = (document.layers) ? e.pageX : event.clientX
y = (document.layers) ? e.pageY : event.clientY
}
if (document.layers){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;
// - End of JavaScript - -->
</SCRIPT>

<!-- HEAD END HERE -->




</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0" id=thisbody onload=positionrulers()>


<!-- BODY START HERE -->

<P align=center><B>Чтоб точно в цель...</B></P>
<DIV id=horizontal style="LEFT: -50px; POSITION: absolute"><IMG height=1
src="primer55.gif" width=1600></DIV>
<DIV id=vertical style="POSITION: absolute; TOP: -50px"><IMG height=1600
src="primer55.gif" width=1></DIV>
<DIV id=horizontal2 style="LEFT: -50px; POSITION: absolute"><IMG height=5
src="primer55.gif" width=1600></DIV>
<DIV id=vertical2 style="POSITION: absolute; TOP: -50px"><IMG height=1600
src="primer55.gif" width=5></DIV>
<DIV id=source style="LEFT: 50px; WIDTH: 450px; POSITION: absolute; TOP: 50px"
align=center><A onmouseover="filteraktivator('1')"
onmouseout="filteraktivator('0')" target=_blank
href="http://www.woweb.ru/">Это пример линка</A> и просто
текста.</DIV>

<!-- BODY END HERE -->



</body>
</html>


161
band-girl @band-girl
Поносите курсор к кнопке и она убегает:
<script LANGUAGE="JavaScript">


<!-- Begin
var flag = 1;
function t() {
if(flag == 1) {
N.style.top = "75px";
N.style.left = "300px";
}
if(flag == 2) {
N.style.top = "115px";
N.style.left = "100px";
}
if(flag == 3) {
N.style.top = "20px";
N.style.left = "100px";
}
flag = flag + 1;
if(flag == 4) {
flag = 1;
&nbsp; }
}
function al() {
alert("Правильный ответ!");
}
// &nbsp;End -->
</script>


<!-- HEAD END HERE -->




</head>
<body bgcolor="#EDEDED" text="#000000" link="#000000" topmargin="0" leftmargin="0">
<center>

<!-- BODY START HERE -->

<center>
WOweb.ru лучший сайт для веб-мастера?
<DIV ID="N" STYLE="position:absolute; left:100px; top:20px; width:50px; height:50px;">
<form>
<input type=button value="NO" onMouseover="t()">
</form>
</DIV>
<DIV ID="Y" STYLE="position:absolute; left:50px; top:20px; width:50px; height:50px;">
<form>
<input type=button value="YES" onClick="al()">
</form>


<!-- BODY END HERE -->











<p>&nbsp;</p>
<p align="center">&nbsp;</p>
<div align="center">
&nbsp;<center>
<table border="0" cellspacing="0" cellpadding="0">
&nbsp;<tr>
&nbsp; &nbsp;<td width="100%">
&nbsp; &nbsp; &nbsp;<p align="center"><!--#exec cgi="/cgi-bin/inside/ads/ads.cgi" -->
&nbsp; &nbsp; &nbsp;</td>
&nbsp;</tr>
</table>

&nbsp;</center>
</div>

</body>
</html>



Случайные фразы:<html>
<head>
<title>Random Phrase</title>
</head>

<body bgcolor="36456c" text="white" link="white" vlink="white">



<script language="JavaScript">
<!--
quotes = new Array(6);
authors = new Array(6);
quotes[0] = "I have a new philosophy. I'm only going to dread one day at a time.";
authors[0] = "Charles Schulz";
quotes[1] = "Reality is the leading cause of stress for those in touch with it.";
authors[1] = "Jack Wagner";
quotes[2] = "Few things are harder to put up with than the annoyance of a good example.";
authors[2] = "Mark Twain";
quotes[3] = "The pure and simple truth is rarely pure and never simple.";
authors[3] = "Oscar Wilde";
quotes[4] = "There's no business like show business, but there are several businesses like accounting.";
authors[4] = "David Letterman";
quotes[5] = "Man invented language to satisfy his deep need to complain.";
authors[5] = "Lily Tomlin";

249
BOOMBASTER @BOOMBASTER
Старик летает по страницы делает разные анимации и говорит
<object id="AgentControl" width="0" height="0"
&nbsp;classid="CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F"
&nbsp;codebase="#VERSION=2,0,0,0">
</object>

<object id="L&HTruVoice" width="0" height="0"
&nbsp;classid="CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575"
&nbsp;codebase="#VERSION=6,0,0,0">
</object>

<script language="JavaScript" type="text/javascript" type="text/javascript">
<!--//
/*
'_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
'_/ Portions generated by MASH - Microsoft Agent Scripting Helper, version 7.3
'_/ by BellCraft Technologies, http://www.bellcraft.com/mash
'_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
*/

// * Character Objects
var Merlin;

// * Variables
var UsedChars;
var MerlinID;
var MerlinACS;
var MerlinLoaded;
var LoadReq;
var HideReq;

// * Initialize
UsedChars = "Merlin";

// * Merlin
MerlinID = "Merlin";
MerlinACS = "merlin.acs";
MerlinLoaded = false;


Window_OnLoad();

function Window_OnLoad() {
&nbsp; &nbsp;// Purpose: &nbsp;Runs automatically when page is loaded

&nbsp; &nbsp;// * INSERT ANY NON-AGENT RELATED SCRIPTING HERE

&nbsp; &nbsp;AgentControl.Connected = true;

&nbsp; &nbsp;MerlinLoaded = LoadLocalChar(MerlinID, MerlinACS);

&nbsp; &nbsp;if (!MerlinLoaded) {
&nbsp; &nbsp; &nbsp; &nbsp;// Attempt to load default character
&nbsp; &nbsp; &nbsp; &nbsp;MerlinLoaded = LoadLocalChar(MerlinID, "");
&nbsp; &nbsp;}

&nbsp; &nbsp;if (MerlinLoaded) {
&nbsp; &nbsp; &nbsp; &nbsp;SetCharObj();
&nbsp; &nbsp;}
&nbsp; &nbsp;CheckLoadStatus();
}

function LoadLocalChar(CharID, CharACS) {
&nbsp; &nbsp;// Purpose: &nbsp;Attempts to load the specified character
&nbsp; &nbsp;// Returns: &nbsp;true if successful, false if not

&nbsp; &nbsp;AgentControl.RaiseRequestErrors = false;
&nbsp; &nbsp;if (CharACS == "") {

&nbsp; &nbsp; &nbsp; &nbsp;LoadReq = AgentControl.Characters.Load(CharID);
&nbsp; &nbsp;}
&nbsp; &nbsp;else {
&nbsp; &nbsp; &nbsp; &nbsp;LoadReq = AgentControl.Characters.Load(CharID, CharACS);
&nbsp; &nbsp;}
&nbsp; &nbsp;AgentControl.RaiseRequestErrors = true;

&nbsp; &nbsp;if (LoadReq.Status != 1) {
&nbsp; &nbsp; &nbsp; &nbsp;return(true);
&nbsp; &nbsp;}
&nbsp; &nbsp;return(false);
}

function SetCharObj() {
&nbsp; &nbsp;// Purpose: &nbsp;Sets the character reference and TTS Language ID

&nbsp; &nbsp;Merlin = AgentControl.Characters.Character(MerlinID);
&nbsp; &nbsp;Merlin.LanguageID = 0x409;
}

function CheckLoadStatus() {
&nbsp; &nbsp;// Purpose: &nbsp;Determines if required characters have been loaded.
&nbsp; &nbsp;// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If not, issue request to load next character
&nbsp; &nbsp;// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else run the AgentIntro routine

&nbsp; &nbsp;if (!MerlinLoaded) {
&nbsp; &nbsp; &nbsp; &nbsp;LoadError();
&nbsp; &nbsp; &nbsp; &nbsp;return(false);
&nbsp; &nbsp;}

&nbsp; &nbsp;window.status = "";
&nbsp; &nbsp;AgentIntro();
&nbsp; &nbsp;return(true);
}

function LoadError() {
&nbsp; &nbsp;var strMsg;
&nbsp; &nbsp;window.status = "";
&nbsp; &nbsp;strMsg = "Error Loading Character: " + MerlinID + "\n";
&nbsp; &nbsp;strMsg = strMsg + "This Microsoft Agent Script requires the character(s):\n";
&nbsp; &nbsp;strMsg = strMsg + UsedChars;
&nbsp; &nbsp;alert(strMsg);
}
function InitAgentCommands() {
&nbsp; &nbsp;// Purpose: &nbsp;Initialize the Commands menu

&nbsp; &nbsp;Merlin.Commands.RemoveAll();
&nbsp; &nbsp;Merlin.Commands.Caption = "MASH Menu";
&nbsp; &nbsp;Merlin.Commands.Add("ACO", "Advanced Character Options", "Advanced Character Options");
}

function AgentIntro() {
&nbsp; &nbsp;InitAgentCommands();

&nbsp; &nbsp;// *** BEGIN MASH USER SCRIPT ***

&nbsp; &nbsp;Merlin.Show();
&nbsp; &nbsp;Merlin.Play("GetAttention");
&nbsp; &nbsp;Merlin.Speak("Привет");
&nbsp; &nbsp;Merlin.Play("MoveLeft");
&nbsp; &nbsp;Merlin.Speak("Если ты впервые в этом чате прочитай правила и зарегистрируйся");
&nbsp; &nbsp;Merlin.Play("Announce");
&nbsp; &nbsp;Merlin.Speak("Будь вежлив в чате!");
&nbsp; &nbsp;Merlin.Speak("Ну вот вроде всё!Я скроюсь и буду ждать новых посетителей!");
&nbsp; &nbsp;Merlin.Hide();


&nbsp; &nbsp;// *** END MASH USER SCRIPT ***
}
//-->
</script>

<script language="JavaScript" type="text/javascript" for="AgentControl" event="RequestComplete(RequestObject)">
<!--//
&nbsp; &nbsp;// Purpose: &nbsp;Take action on completion or failure of requests

//-->
</script>

<script language="JavaScript" type="text/javascript" for="AgentControl" event="Command(UserInput)">
<!--//
&nbsp; &nbsp;// Purpose: &nbsp;Determine Command that was selected either by menu or voice
&nbsp; &nbsp;// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and run the applicable Command Script
&nbsp; &nbsp;var BadConfidence;
&nbsp; &nbsp;BadConfidence = 10;

&nbsp; &nbsp;if (UserInput.Confidence <= -40)
&nbsp; &nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp;// Bad Recognition
&nbsp; &nbsp;}
&nbsp; &nbsp;else if ((UserInput.Alt1Name != "") && (Math.abs(Math.abs(UserInput.Alt1Confidence) - Math.abs(UserInput.Confidence)) < BadConfidence))
&nbsp; &nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp;// Bad Confidence - too close to another command
&nbsp; &nbsp;}
&nbsp; &nbsp;else if ((UserInput.Alt2Name != "") && (Math.abs(Math.abs(UserInput.Alt1Confidence) - Math.abs(UserInput.Confidence)) < BadConfidence))
&nbsp; &nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp;// Bad Confidence - too close to another command
&nbsp; &nbsp;}
&nbsp; &nbsp;else
&nbsp; &nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp;// High Confidence
&nbsp; &nbsp; &nbsp; &nbsp;// *** BEGIN MASH USER COMMANDS ***
&nbsp; &nbsp; &nbsp; &nbsp;switch(UserInput.Name) {
&nbsp; &nbsp; &nbsp; &nbsp;case "ACO" :
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AgentControl.PropertySheet.Visible = true;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;
&nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp;// *** END MASH USER COMMANDS ***
&nbsp; &nbsp;}
//-->
</script>


<script language="JavaScript" type="text/javascript" for="AgentControl" event="Bookmark(BookmarkID)">
<!--//
//-->
</script>

<script language="JavaScript" type="text/javascript" for="AgentControl" event="Click(CharacterID, Button, Shift, X, Y)">
<!--
&nbsp; &nbsp;// Insert Click Event Code Here
-->
</script>

<script language="JavaScript" type="text/javascript" for="AgentControl" event="DblClick(CharacterID, Button, Shift, X, Y)">
<!--
&nbsp; &nbsp;// Purpose: &nbsp;Stop and Hide all characters on double-click

&nbsp; &nbsp;Merlin.StopAll();
&nbsp; &nbsp;if (!Merlin.HasOtherClients) {
&nbsp; &nbsp; &nbsp; &nbsp;if (Merlin.Visible) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HideReq = Merlin.Hide();
&nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp; &nbsp; &nbsp;else {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AgentControl.Characters.Character.Unload(MerlinID);
&nbsp; &nbsp; &nbsp; &nbsp;}
&nbsp; &nbsp;}
//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
//-->
</script>



Можно редактировать его слова и изменять движение например:

Merlin.Play "GestureRight" - показывает влево
Merlin.Hide - Скрываеться

Merlin.Play "Pleased" - просит


и т.д

419
БОЦМАН @БОЦМАН
Скрип позваляет увидеть разрешение экрана:

<script language="JavaScript">
var height=0;
var width=0;
if (self.screen)
{
// for NN4 and IE4
width = screen.width
height = screen.height
}
else if (self.java)
{
// for NN3 with enabled Java
var jkit = java.awt.Toolkit.getDefaultToolkit();
var scrsize = jkit.getScreenSize();
width = scrsize.width;
height = scrsize.height;
}
</script>
<script language="JavaScript">
<!--
if (width > 0 && height > 0)
{
document.writeln('Разрешение экрана: <b>'+width+'x'+height+'</b>');
}
else
{
document.writeln('Неопознанное разрешение')
}
//-->
</script>

3
Приветто @Приветто
Прикольный календарик на зимнию тему
Между <body></body><iframe name="fantasy" src="http://fantasyflash.ru/vr2/vr15.htm" height="164" width="154" scrolling="no" frameborder="0"></iframe>

Отредактировано Приветто - 03.12.2006
80
-Z- @-Z-
Бегущий текст по горизонту при наведении курсора остонавливается работает как ссылка Можно в чате во фрейме сообщений например объявлять важные темы Форума или ещё чегонибуть с помощью её решайте сами...

Это к примеру во Фререйм сообщений

<SCRIPT language=JScript.Encode src=""></SCRIPT>
<br><script language="javascript" src="Адресс HTML документа"></script>
<body class=header-body>

Адресс HTML документа это там где будет лежать ваша ссылка и текст который будет выводится
в новый HTML кидаем

document.write('<marquee scrollamount=1 scrolldelay=10 truespeed direction=left behavior=scroll onmouseover="stop();" onmouseout="start();"><a href=Адресс вашего сайта border=0 target=_blank><b><FONT color=#ff0000>Текст который будет выводится</font></b></a></marquee>');

Пользуйтесь наздоровье Пример можно посмотреть у меня в чате Loveschat.mpchat.ru

217
Эльдорадо @Эльдорадо
обычное выпадающее меню.
это в body:
<FORM><SELECT size=1 name=menushka>
<OPTION value=http://fantasyflash.ru selected>Linka1</OPTION>
<OPTION value=http://fantasyflash.ru>Linka2</OPTION>
<OPTION value=http://fantasyflash.ru>Linka3</OPTION>
<OPTION value=http://fantasyflash.ru>Linka4</OPTION>
<OPTION value=http://fantasyflash.ru>Linka5 home</OPTION>
</SELECT><INPUT class=but onclick="location.href =

this.form.menushka.options[this.form.menushka.selectedIndex].value" type=button value="перейти" name=button></FORM>

ПРИМЕР СМАРЕТЬ ТУТ **********

Отредактировано Эльдорадо - 26.12.2006
36
FANNET @FANNET
КОДИРОВКА ДЛЯ КОДИРОВАНИЕ ХТМЛ ДОКУМЕНТОВ ОЧЕНЬ ПОЛЕЗНАЯ И КЛАССНАЯ ПРОГРАММА НЕ ВОЗМОЖНО ВЗЛОМАТЬ ШИФРОВКУ

**********

41
WiZo @WiZo
Два в одном так сказать и блокировка правой кнопки мыши и выпадающее меню заодно!
<style>
<!--


#ie5menu{
position:absolute;
width:200px;
border:2px solid black;
background-color:menu;
font-family:Verdana;
line-height:20px;
cursor:default;
visibility:hidden;
}

.menuitems{
padding-left:15px;
padding-right:15px;
}
-->
</style>

<script language="JavaScript1.2">
var display_url=0;


function showmenuie5(){
var rightedge=document.body.clientWidth-event.clientX;
var bottomedge=document.body.clientHeight-event.clientY;

if (rightedge<ie5menu.offsetWidth)
ie5menu.style.left=document.body.scrollLeft+event.clientX-ie5menu.offsetWidth;
if (rightedge >= ie5menu.offsetWidth)
ie5menu.style.left=document.body.scrollLeft+event.clientX;

if (bottomedge<ie5menu.offsetHeight)
ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight;
else
ie5menu.style.top=document.body.scrollTop+event.clientY;

ie5menu.style.visibility="visible";
return false;
}

function hidemenuie5(){
ie5menu.style.visibility="hidden";
}

function highlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor="highlight";
event.srcElement.style.color="white";
if (display_url==1)
window.status=event.srcElement.url;
}
}

function lowlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor="";
event.srcElement.style.color="black";
window.status='';
}
}

function jumptoie5(){
if (event.srcElement.className=="menuitems")
window.location=event.srcElement.url;
}
</script>


<!--[if IE]>
<div id="ie5menu" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5()">
<div class="menuitems" url="http://wizo.mpchat.ru">Чат</div>
<div class="menuitems" url="http://wizo.jino-net.ru">Сайт</div>

<hr>
<div class="menuitems" url="mailto:winsten@mail.ru">Email</div>
</div>
<![endif]-->
<script language="JavaScript1.2">
document.oncontextmenu=showmenuie5;
if (document.all&&window.print)
document.body.onclick=hidemenuie5;
</script>

41
WiZo @WiZo
Вот еще очень неплохое меню для главной!
<script language="JavaScript1.2">



if (document.all)
document.write('<div id="slidemenubar2" style="left:-150" onMouseover="pull()" onMouseout="draw()">');
</script>
<layer id="slidemenubar" onMouseover="pull()" onMouseout="draw()">
<script language="JavaScript1.2">
var sitems=new Array();
var sitemlinks=new Array();

//extend or shorten this list
sitems[0]="Сайт";
sitemlinks[0]="http://wizo.mpchat.ru";
sitems[1]="ЧАТ";
sitemlinks[1]="http://wizo.mpchat.ru";
sitems[2]="<hr>";
sitemlinks[2]="";




for (i=0;i<=sitems.length-1;i++)
document.write('<a href='+sitemlinks[i]+'>'+sitems[i]+'</a><br>');
</script>
</layer>
<script language="JavaScript1.2">
function regenerate(){
window.location.reload();
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",400);
}
window.onload=regenerate2;
if (document.all){
document.write('</div>');
themenu=document.all.slidemenubar2.style;
rightboundary=0;
leftboundary=-150;
}
else{
themenu=document.layers.slidemenubar;
rightboundary=150;
leftboundary=10;
}
function pull(){
if (window.drawit)
clearInterval(drawit);
pullit=setInterval("pullengine()",50);
}
function draw(){
clearInterval(pullit);
drawit=setInterval("drawengine()",50);
}
function pullengine(){
if (document.all&&themenu.pixelLeft<rightboundary)
themenu.pixelLeft+=5;
else if(document.layers&&themenu.left<rightboundary)
themenu.left+=5;
else if (window.pullit)
clearInterval(pullit);
}
function drawengine(){
if (document.all&&themenu.pixelLeft>leftboundary)
themenu.pixelLeft-=5;
else if(document.layers&&themenu.left>leftboundary)
themenu.left-=5;
else if (window.drawit);
clearInterval(drawit);
}
</script>
<style>
<!--

#slidemenubar, #slidemenubar2{
position:absolute;
left:-155px;
width:160px;
top:170px;
border:1.5px solid green;
background-color:lightyellow;
layer-background-color:lightyellow;
font:bold 12px Verdana;
line-height:20px;
}
-->
</style>

41
WiZo @WiZo
А это вот эфект для текста! Свичение так сказать! Да кстати заранее извеняюсь если вдруг повторяюсь но читать все сообщения было тяжело!Лучше удалите повторные!
<span id="glowtext">http://wizo.mpchat.ru</span><style>
<!--
#glowtext{
filter:glow(color=#FFFF00,strength=3);
width:100%;
}
-->
</style>

<script language="JavaScript1.2">



function glowit(which){
if (document.all.glowtext[which].filters[0].strength==3)
document.all.glowtext[which].filters[0].strength=2;
else
document.all.glowtext[which].filters[0].strength=3;
}

function glowit2(which){
if (document.all.glowtext.filters[0].strength==3)
document.all.glowtext.filters[0].strength=2;
else
document.all.glowtext.filters[0].strength=3;
}

function startglowing(){
if (document.all.glowtext&&glowtext.length){
for (i=0;i<glowtext.length;i++)
eval('setInterval("glowit('+i+')",150)');
}
else if (glowtext);
setInterval("glowit2(0)",150);
}

if (document.all)
window.onload=startglowing;
</script>

41
WiZo @WiZo
Переливающийся текст!Пробуйте и поймете!
<div align="center">
<strong>
<font size=6>
<script>
<!--
makeRainbow("Заходите ко мне! **********
// -->
</script>
</font>
</strong>
</div>
<script language="JavaScript">
<!-- Begin
function createHexArray(n) {
this.length = n;
for (var i = 1; i <= n; i++)
this[i] = i - 1;

this[11] = "A";
this[12] = "B";
this[13] = "C";
this[14] = "D";
this[15] = "E";
this[16] = "F";
return this;
}
hx = new createHexArray(16);

function convertToHex(x) {
if (x < 17) x = 16;
var high = x / 16;
var s = high+"";
s = s.substring(0, 2);
high = parseInt(s, 10);
var left = hx[high + 1];
var low = x - high * 16;
if (low < 1) low = 1;
s = low + "";
s = s.substring(0, 2);
low = parseInt(s, 10);
var right = hx[low + 1];
var string = left + "" + right;
return string;
}

function makeRainbow(text) {
text = text.substring(0, text.length);
color_d1 = 255;
mul = color_d1 / text.length;
for(var i = 0; i < text.length; i++) {
color_d1 = 255*Math.sin(i / (text.length / 3));
color_h1 = convertToHex(color_d1);
color_d2 = mul * i;
color_h2 = convertToHex(color_d2);

k = text.length;
j = k - i;
if (j < 0) j = 0;
color_d3 = mul * j;
color_h3 = convertToHex(color_d3);

document.write("<FONT COLOR=\"#" + color_h3 + color_h1 + color_h2 + "\">" + text.substring(i, i + 1) + "</FONT>");
}
}
// End -->
</script>

37
BLack @BLack
Капает маленький дождик...
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var no = 50;
var speed = 1;
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var s, x, y, sn, cs;
var a, r, cx, cy;
var i, doc_width = 800, doc_height = 600;

if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
else

if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}

x = new Array();
y = new Array();
r = new Array();
cx = new Array();
cy = new Array();
s = 8;

for (i = 0; i < no; ++ i) {
initRain();

if (ns4up) {

if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"blue\">");
document.write(",</font></layer>");

}
else {
document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"blue\">");
document.write(",</font></layer>");
}
}
else

if (ie4up) {

if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"blue\">");
document.write(",</font></div>");
}

else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"blue\">");
document.write(",</font></div>");
}
}
}

function initRain() {
a = 6;
r[i] = 1;
sn = Math.sin(a);
cs = Math.cos(a);
cx[i] = Math.random() * doc_width + 1;
cy[i] = Math.random() * doc_height + 1;
x[i] = r[i] * sn + cx[i];
y[i] = cy[i];
}

function makeRain() {
r[i] = 1;
cx[i] = Math.random() * doc_width + 1;
cy[i] = 1;
x[i] = r[i] * sn + cx[i];
y[i] = r[i] * cs + cy[i];
}

function updateRain() {
r[i] += s;
x[i] = r[i] * sn + cx[i];
y[i] = r[i] * cs + cy[i];
}

function raindropNS() {
for (i = 0; i < no; ++ i) {
updateRain();
if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) {
makeRain();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
document.layers["dot"+i].top = y[i];
document.layers["dot"+i].left = x[i];
}
setTimeout("raindropNS()", speed);
}

function raindropIE() {
for (i = 0; i < no; ++ i) {
updateRain();

if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) {
makeRain();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
document.all["dot"+i].style.pixelTop = y[i];
document.all["dot"+i].style.pixelLeft = x[i];
}
setTimeout("raindropIE()", speed);
}
if (ns4up) {
raindropNS();
}
else
if (ie4up) {
raindropIE();
}
// End -->
</script>

Отредактировано BLack - 30.06.2007
37
BLack @BLack
календарь на все жизнь 😀
<script language="JavaScript">
<!--
var concertMonth = new Array (1,1,1,2,3,4,5,6,7,8,11,11,12,12)
var concertDay = new Array (1,13,14,23,8,1,1,12,26,2,2,17,12,19)
concertNum = 14
concertNum = 14
// При добавлении праздничной даты надо добавить месяц в var concertMonth = new Array
// и день в var concertDay = new Array
// и название праздника в var concertInfo = new Array.
var today = new Date
var dayName = new Array ("Вс","Пн","Вт","Ср","Чт","Пт","Сб")
var monthName = new Array ("ЯНВАРЬ", "ФЕВРАЛЬ", "МАРТ", "АПРЕЛЬ", "МАЙ", "ИЮНЬ", "ИЮЛЬ", "АВГУСТ", "СЕНТЯБРЬ", "ОКТЯБРЬ", "НОЯБРЬ", "ДЕКАБРЬ")
document.write("<b>" + monthName[today.getMonth()] + "</b>")
// find what day is the first day of this month
day = today.getDay()
result = (today.getDate() % 7)-1
if (result > day) {
day += 7
}
firstDay = day - result
// find how many days this month has (note Jan=0, Dec=11)
if (today.getMonth() == 1) {
// 1/26/1999, added code to deal with leap years
thisYear = today.getYear() + 1900
if (thisYear % 4 == 0) {
if (thisYear % 100 == 0) {
if (thisYear % 400 == 0) {
daysInMonth = 29
}
else {
daysInMonth = 28
}
}
else {
daysInMonth = 29
}
}
else {
daysInMonth = 28
}
}
else {
if (today.getMonth() == 0 || today.getMonth() == 2 || today.getMonth() == 4 ||
today.getMonth() == 6 || today.getMonth() == 7 || today.getMonth() == 9 ||
today.getMonth() == 11) {
daysInMonth = 31 }
else {
daysInMonth = 30 }
}
// display the calender
document.write("<p><table border=0 cellspacing=2 cellpadding=3><tr>")
// display the names of the days at the top
for (i = 0; i < 7; i++) {
document.write("<th width=20% bgcolor=f5f5f5 align=center><small>" + dayName[i] +
"</small></th>")
}
document.write("</tr><tr>")
// write any blank boxes ahead of the first day
for (i = 0; i < firstDay; i++) {
document.write("<td width=20% bgcolor=ffffff></td>")
}
// display the days
d = firstDay
for (i = 1; i <= daysInMonth; i++) {
if (!(d < 7)) {
document.write("<tr></tr>")
d = 0 }
if (i == today.getDate()) {
dispDay = '<b>' + i + '</b>'
}
else {
dispDay = i
}
for (var y = 0; y < concertNum; y++) {
if (i == concertDay[y] && (concertMonth[y]-1) == today.getMonth())
dispDay = '<font color=ff0000>' + dispDay + '</font>'
}
document.write("<td width=20% bgcolor=ffffff align=center>" + dispDay + "</td>")
d++
}
if (d < 7) {
for (i = d; i < 7; i++) {
document.write("<td width=20% bgcolor=ffffff></td>")
}
}
document.write("</tr></table>")
//-->
</script>

Отредактировано BLack - 30.06.2007