Java скрипты - Форум о заработке в интернете
Форум о заработке в интернете

Вернуться   Форум о заработке в интернете > Форум для вебмастера > Программирование

Важная информация

Программирование Скрипты, cms (Wordpress, Joomla, Drupal и др.), плагины, php, mysql.

Ответ
 
Опции темы Поиск в этой теме Опции просмотра
Старый 13.02.2008, 16:33   #1
fargo
Специалист
 
Аватар для fargo
 
Регистрация: 31.01.2008
Сообщений: 124
1 | 0
0 | 0
Автор темы
  По умолчанию

Сюда выкладуем java скрипты.

Добавить в избранное
PHP код:
<a href="javascript:window. external.AddFavorite ('http://javashelp.cjb.net', 'JavaScrips Free Help site!');"Добавить в избранное</a
Защита "ящика" от роботов
PHP код:
<SCRIPT LANGUAGE="JavaScript">

<!-- 
OriginalCDR Software -->
<!-- 
Web Sitehttp://www.cdrsoft.com -->

<!-- This script and many more are available free online at -->
<!-- 
The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
user 
"eugenezz";
site "yandex.ru";

document.write('<a href=\"mailto:' user '@' site '\">');
document.write(user '@' site '</a>');
// End -->
</SCRIPT> 
Кнопка "написать письмо"
PHP код:
<script>
// This script found at the JavaScript Place

var mailsys="Netscape mail";


function 
mailsome1(){
who=prompt("Введите e-mail адрес Вашего друга: ","[email protected]");
what=prompt("Введите в поле \"subject\": ","[no subject]");
if (
confirm("Вы уверены, что хотите отправить письмо "+who+" с \"subject\" "+what+"?")==true){
parent.location.href='mailto:'+who+'?subject='+what+'';
}
}
</script><a href='javascript:mailsome1()'>Написать другу</a><BR>
</font>
<font size="1" color="#000000" face="Arial">
Или кнопка</font>
<font size="4" color="#FF0000">
<form>
<p align="center">
<input type=button value="Написать письмо!" onClick="mailsome1()" style="font-size: 8pt; font-family: Arial">
</form> 
fargo вне форума   Ответить с цитированием
Старый 13.02.2008, 21:31   #2
Cowcanfly
Любитель
 
Регистрация: 11.02.2008
Сообщений: 89
0 | 0
0 | 0
По умолчанию

Могу посоветовать segann.chat.ru/golos.html
Неплохая подборка скриптов
Cowcanfly вне форума   Ответить с цитированием
Старый 14.02.2008, 16:15   #3
fargo
Специалист
 
Аватар для fargo
 
Регистрация: 31.01.2008
Сообщений: 124
1 | 0
0 | 0
Автор темы
  По умолчанию

это надо писать в тему сайты со скрипатми.

Вот еще:

POP-UP часы

Цитата:
<html>
<head>
<title>Время:</title>
<script language="javascript">

var isNS=(navigator.appName=="Netscape");
var _all=(isNS)? 'outer.document.' : 'all.' ;
var _style=(isNS)? '' : '.style' ;
var cnt=new Array(), radius=6, result, now=new Date();
var ring1_X, ring2_X, ring3_X, ring4_X, ring5_X, ring6_X, ring1_Y, ring2_Y, ring3_Y, ring4_Y, ring5_Y, ring6_Y;
var names='hrs1hrs2hrs3hrs4min1min2min3min4min5sec1sec 2sec3sec4sec5sec6';
var dow="SunMonTueWedThuFriSatSun";
var months=new Array('January','Febuary','March','April','May','J une','July','August','September','October','Novemb er','December');
var timestring=''

function init(){
cnt[0]=0;
for(i=1;i<=60;i++){
cnt[i]=cnt[i-1]+((Math.PI*2)/60);
cnt[i-1]+=Math.PI/180;
}
for(num=1;num<=6;num++){
eval('ring'+num+'_X=new Array()');
eval('ring'+num+'_Y=new Array()');
for(i=1;i<=60;i++){
result=((i-15)<0)? 60+i-15 : i-15;
eval('ring'+num+'_X['+i+']='+Math.floor((num*radius*Math.cos(cnt[result]))+56));
eval('ring'+num+'_Y['+i+']='+Math.floor((num*radius*Math.sin(cnt[result]))+55));
}
eval('ring'+num+'_Y[0]=ring'+num+'_Y[60]');
eval('ring'+num+'_X[0]=ring'+num+'_X[60]');
}
runclock();
}

function runclock(){
timestring=''
now=new Date(); now.hrs=now.getHours(); now.min=now.getMinutes(); now.sec=now.getSeconds();
if (now.hrs<10) timestring+='0'+now.hrs+':'; else timestring+=now.hrs+':'
if (now.min<10) timestring+='0'+now.min+':'; else timestring+=now.min+':'
if (now.sec<10) timestring+='0'+now.sec; else timestring+=now.sec

document.digital.digital2.value=timestring
now.hrs=(now.hrs>=12)? now.hrs-12 : now.hrs;
now.hrs=Math.floor((now.hrs*5)+(now.min/12));
for(n=0;n<names.length;n+=4){
movetick(names.substr(n,4), names.substr(n+3,1), 'now.'+names.substr(n,3) );
}
setTimeout('runclock()',1000);
}

function movetick(obj,ringnum,timestep){
if(isNS){
eval(obj+'.top=ring'+ringnum+'_Y['+timestep+']');
eval(obj+'.left=ring'+ringnum+'_X['+timestep+']');
}else{
eval(obj+'.pixelTop=ring'+ringnum+'_Y['+timestep+']');
eval(obj+'.pixelLeft=ring'+ringnum+'_X['+timestep+']');
}}

//document.title=dow.substr(now.getDay()*3,3)+', '+months[now.getMonth()]+' '+now.getDate()+', '+now.getFullYear()

window.onload=init;

</script>
</head>
<body bgcolor="teal">

<center>


<script language="javascript">

var txt='';
txt+='<table border="0" width="117" height="117" cellspacing="0" cellpadding="0"><tr><td align="center">';
txt+=(isNS)? '<ilayer name="outer" height="117" width="117" z-index="1"><img src="faceclocks.gif">' : '<div id="outer" style="position:relative; width:117px; height:117px; z-index:1"><img src="faceclock.gif">';
txt+=(isNS)? '<layer name="hrs1" top="-3000" left="0" bgcolor="red" width="6" height="6" z-index="19"></layer>' : '<div id="hrs1" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:red; font-size:6px; z-index:19"></div>';
txt+=(isNS)? '<layer name="hrs2" top="-3000" left="0" bgcolor="red" width="6" height="6" z-index="18"></layer>' : '<div id="hrs2" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:red; font-size:6px; z-index:18"></div>';
txt+=(isNS)? '<layer name="hrs3" top="-3000" left="0" bgcolor="red" width="6" height="6" z-index="17"></layer>' : '<div id="hrs3" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:red; font-size:6px; z-index:17"></div>';
txt+=(isNS)? '<layer name="hrs4" top="-3000" left="0" bgcolor="red" width="6" height="6" z-index="16"></layer>' : '<div id="hrs4" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:red; font-size:6px; z-index:16"></div>';
txt+=(isNS)? '<layer name="min1" top="-3000" left="0" bgcolor="blue" width="6" height="6" z-index="15"></layer>' : '<div id="min1" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:blue; font-size:6px; z-index:15"></div>';
txt+=(isNS)? '<layer name="min2" top="-3000" left="0" bgcolor="blue" width="6" height="6" z-index="14"></layer>' : '<div id="min2" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:blue; font-size:6px; z-index:14"></div>';
txt+=(isNS)? '<layer name="min3" top="-3000" left="0" bgcolor="blue" width="6" height="6" z-index="13"></layer>' : '<div id="min3" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:blue; font-size:6px; z-index:13"></div>';
txt+=(isNS)? '<layer name="min4" top="-3000" left="0" bgcolor="blue" width="6" height="6" z-index="12"></layer>' : '<div id="min4" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:blue; font-size:6px; z-index:12"></div>';
txt+=(isNS)? '<layer name="min5" top="-3000" left="0" bgcolor="blue" width="6" height="6" z-index="11"></layer>' : '<div id="min5" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:blue; font-size:6px; z-index:11"></div>';
txt+=(isNS)? '<layer name="sec1" top="-3000" left="0" bgcolor="black" width="6" height="6" z-index="10"></layer>' : '<div id="sec1" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:black; font-size:6px; z-index:10"></div>';
txt+=(isNS)? '<layer name="sec2" top="-3000" left="0" bgcolor="black" width="6" height="6" z-index="9"></layer>' : '<div id="sec2" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:black; font-size:6px; z-index:9"></div>';
txt+=(isNS)? '<layer name="sec3" top="-3000" left="0" bgcolor="black" width="6" height="6" z-index="8"></layer>' : '<div id="sec3" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:black; font-size:6px; z-index:8"></div>';
txt+=(isNS)? '<layer name="sec4" top="-3000" left="0" bgcolor="black" width="6" height="6" z-index="7"></layer>' : '<div id="sec4" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:black; font-size:6px; z-index:7"></div>';
txt+=(isNS)? '<layer name="sec5" top="-3000" left="0" bgcolor="black" width="6" height="6" z-index="6"></layer>' : '<div id="sec5" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:black; font-size:6px; z-index:6"></div>';
txt+=(isNS)? '<layer name="sec6" top="-3000" left="0" bgcolor="black" width="6" height="6" z-index="5"></layer>' : '<div id="sec6" style="position:absolute; top:-3000px; left:-3000px; width:6px; height:6px; background-color:black; font-size:6px; z-index:5"></div>';
txt+=(isNS)? '</ilayer>' : '</div>';
txt+='</td></tr></table>';

document.write(txt);

for(n=0;n<names.length;n+=4){
eval('var '+names.substr(n,4)+'=document.'+_all+names.substr (n,4)+_style);
}

</script>
<form name="digital"><input type="button" name="digital2" style="font:12px black Verdana" value="Закрыть" onClick="window.close()"></form>

</center>

</body>
</html>
fargo вне форума   Ответить с цитированием
Старый 21.02.2008, 20:21   #4
fargo
Специалист
 
Аватар для fargo
 
Регистрация: 31.01.2008
Сообщений: 124
1 | 0
0 | 0
Автор темы
  По умолчанию

Летающий заголовок (текстовый эфект)

Цитата:
<script language="JavaScript1.2">

/*
Bouncy message script- By Dynamicdrive.com
*/

//Configure the below three variables

//1) Введите свое сообщение (HTML тэги также), <h4></h4> определяют размер шрифта
var thecontent='<h4><font color="#0000FF">Добро пожаловать на http://JavasHelp.cjb.net!</font></h4>'
//2) Установите скорость "рекошетирования" (1-50)
var BallSpeed = 5;



var hidetimer='';
var contentWidth;
var contentHeight;
var maxBallSpeed = 50;


var xMax;
var yMax;
var xPos = 0;
var yPos = 0;
var xDir = 'right';
var yDir = 'down';
var superballRunning = true;
var tempBallSpeed;
var currentBallSrc;
var newXDir;
var newYDir;

function initializeBall() {
if (document.all) {
xMax = document.body.clientWidth
yMax = document.body.clientHeight
document.all("supertext").style.visibility = "visible";
contentWidth=supertext.offsetWidth
contentHeight=supertext.offsetHeight
}
else if (document.layers) {
xMax = window.innerWidth;
yMax = window.innerHeight;
contentWidth=document. supertext.document.width
contentHeight=document. supertext.document.height
document.layers["supertext"]. visibility = "show";
}
setTimeout('moveBall()',400);
if (hidetimer!='')
setTimeout("hidetext()",hidetimer)
}

function moveBall() {
if (superballRunning == true) {
calculatePosition();
if (document.all) {
document.all("supertext").style.left = xPos + document.body.scrollLeft;
document.all("supertext").style.top = yPos + document.body.scrollTop;
}
else if (document.layers) {
document.layers["supertext"].left = xPos + pageXOffset;
document.layers["supertext"].top = yPos + pageYOffset;
}
animatetext=setTimeout('moveBall()',20);
}
}

function calculatePosition() {
if (xDir == "right") {
if (xPos > (xMax - contentWidth - BallSpeed)) {
xDir = "left";
}
}
else if (xDir == "left") {
if (xPos < (0 + BallSpeed)) {
xDir = "right";
}
}
if (yDir == "down") {
if (yPos > (yMax - contentHeight - BallSpeed)) {
yDir = "up";
}
}
else if (yDir == "up") {
if (yPos < (0 + BallSpeed)) {
yDir = "down";
}
}
if (xDir == "right") {
xPos = xPos + BallSpeed;
}
else if (xDir == "left") {
xPos = xPos - BallSpeed;
}
else {
xPos = xPos;
}
if (yDir == "down") {
yPos = yPos + BallSpeed;
}
else if (yDir == "up") {
yPos = yPos - BallSpeed;
}
else {
yPos = yPos;
}
}

function hidetext(){
if (document.all)
supertext.style.visibility="hidden"
else if (document.layers)
document.supertext.visibility="hide"
clearTimeout(hidetext)
}

if (document.all||document.layers){
document.write('<span id= "supertext"> <nobr>'+thecontent+'</nobr></span>')
window.onload = initializeBall;
window.onresize = new Function("window.location.reload()");
}

</script>
fargo вне форума   Ответить с цитированием
Старый 21.02.2008, 21:23   #5
Winfolk
Специалист
 
Аватар для Winfolk
 
Регистрация: 12.02.2008
Адрес: ФСБ.ру
Сообщений: 270
0 | 0
0 | 0
По умолчанию

Каталог из 3000 Java-скриптов
Winfolk вне форума   Ответить с цитированием
Старый 14.03.2008, 12:42   #6
fargo
Специалист
 
Аватар для fargo
 
Регистрация: 31.01.2008
Сообщений: 124
1 | 0
0 | 0
Автор темы
  По умолчанию

Скрипт "Дискриминация".

Цитата:
<body onload="wh()">






<SCRIPT LANGUAGE="JavaScript">
function wh(){
if (document.layers)
window.home();
else
alert("Вам повезло, что пользуетесь IE!");
}
</script>
fargo вне форума   Ответить с цитированием
Старый 14.03.2008, 12:46   #7
TRS
GR-Профессионал
 
Аватар для TRS
 
Регистрация: 08.02.2008
Сообщений: 4,377
2 | 0
36 | 0
По умолчанию

Советую использовать этот скрипт:
Цитата:
<script language="JavaScript">
function createBookmark(name) {
we = window.external;
if (!we) {
return true;
} else {
we.addFavorite('http://www.kvn.name/', name);
return false;
}
}
</script>
<a href="http://www.kvn.name/" title="КВН шутки, сценарии" rel="sidebar" onClick="return createBookmark('КВН шутки, сценарии KVN.name');">Добавить в закладки!</a>
Ну естественно адресс вписать свой.
Сам код в тело странички всунуть где-то сюда:
Цитата:
<div class="rightboxhead">
<h2>About the Author</h2>
</div>
<div class="rightboxcontent">Morbi dignissim mattis mi. Sed molestie iaculis purus. Donec gravida scelerisque nunc. Aenean ac nulla. Proin egestas orci non mauris. <a href="#">&raquo; Read More </a></div>
<div class="rightboxbottom"></div>
</div>
TRS вне форума   Ответить с цитированием
Старый 16.03.2008, 15:25   #8
Alpamis
Специалист
 
Аватар для Alpamis
 
Регистрация: 15.02.2008
Сообщений: 405
0 | 0
1 | 0
По умолчанию

Цитата:
Сообщение от fargo, post: 3973
Скрипт "Дискриминация".
Можно поподробнее узнать, что будет если я поставлю такой скрипт на сайт?
Alpamis вне форума   Ответить с цитированием
Старый 25.03.2008, 23:04   #9
Winfolk
Специалист
 
Аватар для Winfolk
 
Регистрация: 12.02.2008
Адрес: ФСБ.ру
Сообщений: 270
0 | 0
0 | 0
По умолчанию

На любом браузере выведет данное сообщение
Winfolk вне форума   Ответить с цитированием
Старый 24.06.2009, 16:39   #10
mihmih
Новичок
 
Регистрация: 23.06.2009
Сообщений: 15
0 | 0
0 | 0
По умолчанию

скрипт "Скроллинг текста"

скрипт "Скроллинг текста"

Код.

Код:
<head>

<script language="JavaScript1.2">

var message= new Array()

// Please read section 2 above on how the messages have to be configured.
// You may add as many messages as you like!
message[0]="Простой скрипт скролинга текста|Можно вставлять ссылки, количество сообщений неограниченно|index.htm"

message[1]="Clinton Bashes NY Mayor|Speaking to 1,000 teacher aides on Saturday, Hillary Rodham Clinton attacked Mayor Rudolph Giuliani's positions on education.|http://case.agava.ru"

message[2]="House Bill Curbs *** Slavery|A House bill designed to protect victims of the growing international *** slavery trade would allow child victims brought to this country to stay in America.|http://case.agava.ru"

// The height of the scrollerbox (pixels)
var scrollerheight=160

// The width of the scrollerbox (pixels)
var scrollerwidth=160

// The distance to the left border of the window (pixels)
var scrollertop=20

// The distance to the top border of the window (pixels)
var scrollerleft=20

// The padding between the scrollerbox and the text (pixels)
var scrollerpadding=10

// The width of the scrollerbox-border (pixels)
var backgroundborder=2

// The background-colour of the scrollerbox
var scrollerbgcolor="DDDDDD"

// Font attributes of the title
var font_titleface="Verdana"
var font_titlecolor="FF0000"
var font_titlesize=1

// Font attributes of the copytext
var font_copyface="Verdana"
var font_copycolor="660000"
var font_copysize=1

// standstill between the messages (milliseconds)
var standstillfix=3000

// Do not edit below this line
var cliptop=0
var clipbottom=scrollerheight-2*scrollerpadding
var clipleft=0
var clipright=scrollerheight

var i_message=0
var mes_joined
var mes_split
var contenttext
var contentbg

var totalheight=scrollerheight*(message.length)
var i_height=0
var step=1
var pause=20

var standstillflex=0

function initiate(){
contenttext="<table cellpadding=0 cellspacing=0 border=0 width="+(scrollerwidth-2*scrollerpadding)+">"
contenttext+="<tr valign='top'><td height='"+scrollerheight+"'><br></td></tr>"
for (i=0;i<=message.length-1;i++) {
mes_joined=message[i]
mes_split=mes_joined.split("|")
contenttext+="<tr valign='top'><td height='"+scrollerheight+"'><a href='"+mes_split[2]+"'><font face='"+font_titleface+"' color='"+font_titlecolor+"' size='"+font_titlesize+"'>"+mes_split[0]+"</font></a><br><font face='"+font_copyface+"' color='"+font_copycolor+"' size='"+font_copysize+"'>"+mes_split[1]+"</font></td></tr>"
}
contenttext+="</table>"

contentbg="<table cellpadding=0 cellspacing=0 border="+backgroundborder+" width='"+scrollerwidth+"'><tr><td height='"+scrollerheight+"' bgcolor="+scrollerbgcolor+"> </td></tr></table>"

if (document.all) {
scrollertext.innerHTML=contenttext
scrollerbg.innerHTML=contentbg
document.all.scrollertext.style.posTop=scrollertop
document.all.scrollertext.style.posLeft=scrollerleft
document.all.scrollerbg.style.posTop=scrollertop-scrollerpadding
document.all.scrollerbg.style.posLeft=scrollerleft-scrollerpadding
document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
}
if (document.layers) {
document.scrollertext.document.write(contenttext)
document.scrollertext.document.close()
document.scrollerbg.document.write(contentbg)
document.scrollerbg.document.close()
document.scrollertext.top=scrollertop
document.scrollertext.left=scrollerleft
document.scrollerbg.top=scrollertop-scrollerpadding
document.scrollerbg.left=scrollerleft-scrollerpadding 
document.scrollertext.clip.left=clipleft
document.scrollertext.clip.right=clipright
document.scrollertext.clip.top=cliptop
document.scrollertext.clip.bottom=clipbottom
}
scroll()
}

function scroll(){
standstillflex=standstillfix
if (document.all){
if (i_height<scrollerheight) {
i_height+=step
cliptop+=step
clipbottom+=step
document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.all.scrollertext.style.posTop-=step
var timer=setTimeout("scroll()",pause)
}

else {
if (document.all.scrollertext.style.posTop<=-(totalheight)) {
document.all.scrollertext.style.posTop=scrollertop
cliptop=0
clipbottom=scrollerheight-2*scrollerpadding
document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
standstillflex=0
}
i_height=0
clearTimeout(timer)
var timer=setTimeout("scroll()",standstillflex)
}
}

if (document.layers){
if (i_height<scrollerheight) {
i_height+=step
cliptop+=step
clipbottom+=step
document.scrollertext.clip.left=clipleft
document.scrollertext.clip.right=clipright
document.scrollertext.clip.top=cliptop
document.scrollertext.clip.bottom=clipbottom
document.scrollertext.top-=step
var timer=setTimeout("scroll()",pause)
}

else {
if (document.scrollertext.top<=-(totalheight)) {
document.scrollertext.top=scrollertop
cliptop=0
clipbottom=scrollerheight-2*scrollerpadding
document.scrollertext.clip.left=clipleft
document.scrollertext.clip.right=clipright
document.scrollertext.clip.top=cliptop
document.scrollertext.clip.bottom=clipbottom
standstillflex=0
}
i_height=0
clearTimeout(timer)
var timer=setTimeout("scroll()",standstillflex)
}
}
}

</script>

<style>

A {
color:AA0000;
}

A:Hover {
color:FF0000;
}

</style>

</head>

<body onLoad="initiate()">

<div id="scrollerbg" style="position:absolute;top:-1000px"> </div>
<div id="scrollertext" style="position:absolute;top:-1000px"> </div>

<DIV id="deletethisdiv" style="position:absolute;top:10px;left:180px"></DIV>

</body>
</html>
mihmih вне форума   Ответить с цитированием
Ответ

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход



Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.