http://fantasyflash.ru/index.php?&kontent=script
один из лучиш скриптовых сайтовДобавлено (2006-12-04, 8:46 Pm)
---------------------------------------------
Ограниченое число символов при вводе текста textarea
<html><body>
<p align=center>
<form name=myform action="YOUR-SCRIPT.CGI">
<font size="1" face="arial, sans-serif"> Ввод до 25 символов. )<br>
<textarea name=message wrap=physical cols=28 rows=4 onKeyDown="checkMaxInput(this.form)" onKeyUp="checkMaxInput(this.form)"></textarea>
<br>
<input readonly type=text name=remLen size=3 maxlength=3 value="25"> characters</font>
</form>
</p>
</body>//osw
</html>
<SCRIPT LANGUAGE="JavaScript">
maxLen = 25;
function checkMaxInput(form) {
if (form.message.value.length > maxLen)
form.message.value = form.message.value.substring(0, maxLen);
else form.remLen.value = maxLen - form.message.value.length;
}
</script>
Добавление страницы в избраное
<a href="javascript:window.external.
AddFavorite(location.href,
%20'Прикольная%20страничка');"> Поместите мою страничку в "Избранное"!</a>
Закрытие браузера посетителя
<A Href="JavaScript:top.window.close();"> Закрыть</A>
Прикольный эффект с текстом
<script>
var fs=1
var direction="right"
function rollertext(whichone){
var thetext=whichone
for (i=0;i<thetext.length;i++){
document.write(thetext.charAt(i).fontsize(fs))
if (fs<7&&direction=="right")
fs++
else if (fs==7){
direction="left"
fs--
}
else if (fs==1){
direction="right"//osw
fs++
}
else if (fs>1&&direction=="left")
fs--
}
}
rollertext("Прикольный текст, неправда ли? Замени своим!")
</script>
Добавлено (2006-06-06, 10:15 Am)
---------------------------------------------
Распечатка страницы на принторе
<script>
var fs=1
var direction="right"
function rollertext(whichone){
var thetext=whichone
for (i=0;i<thetext.length;i++){
document.write(thetext.charAt(i).fontsize(fs))
if (fs<7&&direction=="right")
fs++
else if (fs==7){
direction="left"
fs--
}
else if (fs==1){
direction="right"//osw
fs++
}
else if (fs>1&&direction=="left")
fs--
}
}
rollertext("Прикольный текст, неправда ли? Замени своим!")
</script>
Падающий текст
<script>
var fs=1
var direction="right"
function rollertext(whichone){
var thetext=whichone
for (i=0;i<thetext.length;i++){
document.write(thetext.charAt(i).fontsize(fs))
if (fs<7&&direction=="right")
fs++
else if (fs==7){
direction="left"
fs--
}
else if (fs==1){
direction="right"//osw
fs++
}
else if (fs>1&&direction=="left")
fs--
}
}
rollertext("Прикольный текст, неправда ли? Замени своим!")
</script>
Многослойная надпись за курсором
<SCRIPT language=JavaScript1.2>
<!--
var message='Ваш_текст_:))';
var messagecolor='#000000'
var dismissafter=0
var amount=5,ypos=0,xpos=0,Ay=0,Ax=0,By=0,Bx=0,Cy=0,Cx=0,Dy=0,Dx=0,Ey=0,Ex=0;
if (document.layers){
for (i = 0; i < amount; i++)
{document.write('<layer name=ns'+i+' top=0 left=0><font face="Courier New" size=3 color='+messagecolor+'>'+message+'</font></layer>')}
window.captureEvents(Event.MOUSEMOVE);
function nsmouse(evnt){xpos = evnt.pageX;ypos = evnt.pageY;makefollow()}
}
else if (document.all){
document.write("<div id='outer' style='position:absolute;top:0px;left:0px'>");
document.write("<div id='inner' style='position:relative'>");
for (i = 0; i < amount; i++)
{document.write('<div id="text"'+i+' style="position:absolute;top:0px;left:0px;font-family:Courier New;font-size:16px;color:'+messagecolor+'">'+message+'</div>')}
document.write("</div>");//osw
document.write("</div>");
function iemouse(){ypos = document.body.scrollTop + event.y;xpos = document.body.scrollLeft + event.x;makefollow()}
}
function makefollow(){
if (document.layers){
document.layers["ns0"].top=ay;document.layers["ns0"].left=ax;
document.layers["ns1"].top=by;document.layers["ns1"].left=bx;
document.layers["ns2"].top=cy;document.layers["ns2"].left=cx;
document.layers["ns3"].top=Dy;document.layers["ns3"].left=Dx;
document.layers["ns4"].top=Ey;document.layers["ns4"].left=Ex;
}
else if (document.all){
outer.all.inner.all[0].style.pixelTop=ay;outer.all.inner.all[0].style.pixelLeft=ax;
outer.all.inner.all[1].style.pixelTop=by;outer.all.inner.all[1].style.pixelLeft=bx;
outer.all.inner.all[2].style.pixelTop=cy;outer.all.inner.all[2].style.pixelLeft=cx;
outer.all.inner.all[3].style.pixelTop=Dy;outer.all.inner.all[3].style.pixelLeft=Dx;
outer.all.inner.all[4].style.pixelTop=Ey;outer.all.inner.all[4].style.pixelLeft=Ex;
}
}
function move(){
if (dismissafter!=0)
setTimeout("hidetrail()",dismissafter*1000)
if (document.layers){window.onMouseMove = nsmouse}
else if (document.all){window.document.onmousemove = iemouse}
ey = Math.round(Ey+=((ypos+20)-Ey)*2/2);ex = Math.round(Ex+=((xpos+20)-Ex)*2/2);
dy = Math.round(Dy+=(ey - Dy)*2/4);dx = Math.round(Dx+=(ex - Dx)*2/4);
cy = Math.round(Cy+=(dy - Cy)*2/6);cx = Math.round(Cx+=(dx - Cx)*2/6);
by = Math.round(By+=(cy - By)*2/8);bx = Math.round(Bx+=(cx - Bx)*2/8);
ay = Math.round(Ay+= (by - Ay)*2/10);ax = Math.round(Ax+= (bx - Ax)*2/10);
makefollow();//fantasyflash.narod.ru
jumpstart=setTimeout('move()',10);
}
function hidetrail(){
if (document.all){
for (i2=0;i2<amount;i2++){
outer.all.inner.all[i2].style.visibility="hidden"
clearTimeout(jumpstart)
}
}
else if (document.layers){
for (i2=0;i2<amount;i2++){
temp="ns"+i2
document.layers[temp].visibility="hide"
clearTimeout(jumpstart)
}
}
}
window.onload=move;
//-->
</SCRIPT>
Сылки переливаются всеми цвитами радуги
<script language="JavaScript">
<!--
function initArray() {
for (var i = 0; i < initArray.arguments.length; i++) {
this[i] = initArray.arguments[i];
}
this.length = initArray.arguments.length;
}
//http://lambada.p0.ru
var colors = new initArray(
"green",
"#9900FF",
"#FF00FF",
"#33FF33",
"blue",
"#0099FF",
"#FFFF00",
"red");
pause_time = .5;
link = 0;//osw
vlink = 3;
function linkDance() {
link = (link+1)%colors.length;
vlink = (vlink+1)%colors.length;
document.linkColor = colors[link];
document.vlinkColor = colors[vlink];
setTimeout("linkDance();",pause_time*1000);
}
linkDance();
// -->
</script>
<p align="center"><br>
<a href="site1.htm">Ссылочка1</a><br><br><br>
<a href="site2.html">Ссылочка2</a><br><br><br>
<a href="site3.html">Ссылочка3</a>
</p>
Добавлено (2006-06-06, 10:17 Am)
---------------------------------------------
Эффект змеики
<div id="dot0" style="position: absolute; visibility: hidden; height: 11; width: 11;"><img src="ball2.gif" height=11 width=11></div>
<div id="dot1" style="position: absolute; height: 11; width: 11;"><img src="ball2.gif" height=11 width=11></div>
<div id="dot2" style="position: absolute; height: 11; width: 11;"><img src="ball2.gif" height=11 width=11></div>//osw
<div id="dot3" style="position: absolute; height: 11; width: 11;"><img src="ball2.gif" height=11 width=11></div>
<div id="dot4" style="position: absolute; height: 11; width: 11;"><img src="ball2.gif" height=11 width=11></div>
<div id="dot5" style="position: absolute; height: 11; width: 11;"><img src="ball2.gif" height=11 width=11></div>
<div id="dot6" style="position: absolute; height: 11; width: 11;"><img src="ball2.gif" height=11 width=11></div>
<script LANGUAGE="JavaScript">
<!--
var nDots = 7;
if (document.all&&window.print)
document.body.style.cssText="overflow-x:hidden;overflow-y:scroll"//osw
var Xpos = 0;
var Ypos = 0;
var DELTAT = .01;
var SEGLEN = 10;
var SPRINGK = 10;
var MASS = 1;
var GRAVITY = 50;
var RESISTANCE = 10;
var STOPVEL = 0.1;
var STOPACC = 0.1;
var DOTSIZE = 11;
var BOUNCE = 0.75;
var isNetscape = navigator.appName=="Netscape";
var followmouse = true;
var dots = new Array();
init();
function init()
{
var i = 0;
for (i = 0; i < nDots; i++) {
dots[i] = new dot(i);
}
if (!isNetscape) {
}
for (i = 0; i < nDots; i++) {
dots[i].obj.left = dots[i].X;
dots[i].obj.top = dots[i].Y;
}
if (isNetscape) {
startanimate();
} else {
setTimeout("startanimate()", 2000);
}
}
function dot(i)
{
this.X = Xpos;
this.Y = Ypos;
this.dx = 0;
this.dy = 0;
if (isNetscape) {
this.obj = eval("document.dot" + i);
} else {
this.obj = eval("dot" + i + ".style");
}
}
function startanimate() {
setInterval("animate()", 20);
}
function setInitPositions(dots)
{
var startloc = document.all.tags("LI");
var i = 0;
for (i = 0; i < startloc.length && i < (nDots - 1); i++) {
dots[i+1].X = startloc[i].offsetLeft
startloc[i].offsetParent.offsetLeft - DOTSIZE;
dots[i+1].Y = startloc[i].offsetTop +
startloc[i].offsetParent.offsetTop + 2*DOTSIZE;
}
dots[0].X = dots[1].X;
dots[0].Y = dots[1].Y - SEGLEN;
}
function MoveHandler(e)
{
Xpos = e.pageX;
Ypos = e.pageY;
return true;
}
//fantasyflash.narod.ru
function MoveHandlerIE() {
Xpos = window.event.x + document.body.scrollLeft;
Ypos = window.event.y + document.body.scrollTop;
}
if (isNetscape) {
document.captureEvents(Event.MOUSEMOVE);
document.onMouseMove = MoveHandler;
} else {
document.onmousemove = MoveHandlerIE;
}
function vec(X, Y)
{
this.X = X;
this.Y = Y;
}
function springForce(i, j, spring)
{
var dx = (dots[i].X - dots[j].X);
var dy = (dots[i].Y - dots[j].Y);
var len = Math.sqrt(dx*dx + dy*dy);
if (len > SEGLEN) {
var springF = SPRINGK * (len - SEGLEN);
spring.X += (dx / len) * springF;
spring.Y += (dy / len) * springF;
}
}
function animate() {
var start = 0;
if (followmouse) {
dots[0].X = Xpos;
dots[0].Y = Ypos;
start = 1;
}
for (i = start ; i < nDots; i++ ) {
var spring = new vec(0, 0);
if (i > 0) {
springForce(i-1, i, spring);
}
if (i < (nDots - 1)) {
springForce(i+1, i, spring);
}
var resist = new vec(-dots[i].dx * RESISTANCE,
-dots[i].dy * RESISTANCE);
var accel = new vec((spring.X + resist.X)/ MASS,
(spring.Y + resist.Y)/ MASS + GRAVITY);
dots[i].dx += (DELTAT * accel.X);
dots[i].dy += (DELTAT * accel.Y);
if (Math.abs(dots[i].dx) < STOPVEL &&
Math.abs(dots[i].dy) < STOPVEL &&
Math.abs(accel.X) < STOPACC &&
Math.abs(accel.Y) < STOPACC) {
dots[i].dx = 0;
dots[i].dy = 0;
}
dots[i].X += dots[i].dx;
dots[i].Y += dots[i].dy;
var height, width;
if (isNetscape) {
height = window.innerHeight + document.scrollTop;
width = window.innerWidth + document.scrollLeft;
} else {
height = document.body.clientHeight + document.body.scrollTop;
width = document.body.clientWidth + document.body.scrollLeft;
}
if (dots[i].Y >= height - DOTSIZE - 1) {
if (dots[i].dy > 0) {
dots[i].dy = BOUNCE * -dots[i].dy;
}
dots[i].Y = height - DOTSIZE - 1;
}
if (dots[i].X >= width - DOTSIZE) {
if (dots[i].dx > 0) {
dots[i].dx = BOUNCE * -dots[i].dx;
}
dots[i].X = width - DOTSIZE - 1;
}
if (dots[i].X < 0) {
if (dots[i].dx < 0) {
dots[i].dx = BOUNCE * -dots[i].dx;
}
dots[i].X = 0;
}
dots[i].obj.left = dots[i].X;
dots[i].obj.top = dots[i].Y;
}
}
-->
</script>
Добавлено (2006-06-06, 10:17 Am)
---------------------------------------------
Прикольный эффект
<script language="Javascript">
<!--
var text = "Заходи на мой сайт!!!"
var speed = 200
var x = 0 //osw
function bb() {
var a = text.substring(0,x)
var b = text.substring(x,x+1).toUpperCase()
var c = text.substring(x+1,text.length)
//
window.status = a + b + c
if (x == text.length) {
x = 0
}
else {
x++
}
setTimeout("bb()",speed)
}
bb();
//-->
</script>
Динамичиские часы с тенью
<script language="Javascript">
<!--
var text = "Заходи на мой сайт!!!"
var speed = 200
var x = 0 //osw
function bb() {
var a = text.substring(0,x)
var b = text.substring(x,x+1).toUpperCase()
var c = text.substring(x+1,text.length)
//
window.status = a + b + c
if (x == text.length) {
x = 0
}
else {
x++
}
setTimeout("bb()",speed)
}
bb();
//-->
</script>
ROBOXchange
</tr>
</table><form name="ROBOX" method="post" action="https://www.roboxchange.com/ssl/calc.asp">
<a href="http://www.roboxchange.com/"><img src="http://www.roboxchange.com/img/reklama/logo.gif" width="200" height="31" border="0" alt="ROBOXchange"></a>
<table cellSpacing=0 cellPadding=0 border=0 background="http://www.roboxchange.com/img/reklama/base.gif" width=200 height=150>
<tr>
<td><br></td>
<td valign=bottom align=center style="FONT-SIZE: 10px; FONT-FAMILY: Verdana;">
<font color="#000000">Отдаете:</font><br>
<select name="in_curr" style="width: 125px"> <option value='WMR' selected> WMR </option> <option value='WMZ' > WMZ </option> <option value='WME' > WME </option> <option value='WMU' > WMU </option> <option value='EGZ' > USD e-gold </option> <option value='PCR' > RUR Yandex </option> <option value='PCU' > UAH imoney </option> <option value='PMWMR' > WMR PayMer </option> <option value='PMWMZ' > WMZ PayMer </option> </select>
<br>Получаете:
<select name="out_curr" style="width: 125px"> <option value='WMR' > WMR </opton> <option value='WMZ' selected> WMZ </option> <option value='WME' > WME </option> <option value='WMU' > WMU </option> <option value='EGZ' > USD e-gold </option> <option value='PCR' > RUR Yandex </option> <option value='PCU' > UAH imoney </option> </select>
<input type="hidden" name="p" value="LING">
</td>
</tr>
<tr height=42>
<td width=65><br></td>
<td align=center><input type="submit" value="Выбрал!"></td>
</tr>