КомПик

Объявление

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » КомПик » Скрипты/Шаблоны » Большой сборник скриптов для Форумов и Сайтов


Большой сборник скриптов для Форумов и Сайтов

Сообщений 1 страница 10 из 84

1

Правила раздела:
Здесь пишуться только скрипты. Все пожелания, спрос, ошибки и тд вот СЮДА

Анимирванный текст в форме.

Код:
<script language="JavaScript">
var count = -1;
var counter;
var nchar
var speedtogo = 200
var a = new Array();
a[1] = "СБОРНИК JAVASCRIPTS";
a[2] = "сборник javascripts";
function capswitch() {
count++
if(count == 0){
document.wow.display.value = a[1]
}
if(count == 1){
document.wow.display.value = a[2].substring(0, 1) +
a[1].substring(22, 1)
}
if(count > 1){
a[3] = a[1].substring(0, count - 1) + a[2].substring(count - 1,
count) + a[1].substring(22, count)
document.wow.display.value = a[3]
}
if(count == a[1].length){
count = -1
}
counter = setTimeout("capswitch()",speedtogo);
}
document.write("<FORM NAME=\"wow\">");
document.write("<INPUT TYPE=\"TEXT\" NAME=\"display\" SIZE=\"22\">");
document.write("</FORM>");
capswitch();
</script>

0

2

Бегущий тег <TITLE>.

Код:
<script language="JavaScript">
<!--
var tit = document.title;
var c = 0;
function writetitle()
{
document.title = tit.substring(0,c);
if(c==tit.length)
{
c = 0;
setTimeout("writetitle()", 2000)
}
else
{
c++;
setTimeout("writetitle()", 300)
}
}
writetitle()
//-->
</script>

0

3

Свой текст в строке состояния.

Для того чтобы поместить свой текст в строку состояния браузера необходимо добавить в тег следующий текст
<body … onLoad="window.defaultStatus='Мой текст'">

Скрипт не работает в Opera, в Mozile не проверялся

0

4

Дождь

Код:
<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>

0

5

Дата и время сегодня

Код:
<script language="JavaScript">
function getDateNow()
{
var now = new Date();
var e = now.getDate();
d = e + ' ';
var month = new Array(13);
month[1] = "января";
month[2] = "февраля";
month[3] = "марта";
month[4] = "апреля";
month[5] = "мая";
month[6] = "июня";
month[7] = "июля";
month[8] = "августа";
month[9] = "сентября";
month[10] = "октября";
month[11] = "ноября";
month[12] = "декабря";
var day = new Array(7);
day[0]= "воскресенье";
day[1]= "понедельник";
day[2]= "вторник";
day[3]= "среда";
day[4]= "четверг";
day[5]= "пятница";
day[6]= "суббота";
nday=day[now .getDay()]
nmonths =month[ (now.getMonth() + 1)];
d += nmonths + ', ' +nday ;
return 'Сегодня ' + d+'&nbsp; ' ;
}

//Time town
//---------
var times = new Array(96);
times[0] = "0:00";
times[1] = "0:15";
times[2] = "0:30";
times[3] = "0:45";
times[4] = "1:00";
times[5] = "1:15";
times[6] = "1:30";
times[7] = "1:45";
times[8] = "2:00";
times[9] = "2:15";
times[10] = "2:30";
times[11] = "2:45";
times[12] = "3:00";
times[13] = "3:15";
times[14] = "3:30";
times[15] = "3:45";
times[16] = "4:00";
times[17] = "4:15";
times[18] = "4:30";
times[19] = "4:45";
times[20] = "5:00";
times[21] = "5:15";
times[22] = "5:30";
times[23] = "5:45";
times[24] = "6:00";
times[25] = "6:15";
times[26] = "6:30";
times[27] = "6:45";
times[28] = "7:00";
times[29] = "7:15";
times[30] = "7:30";
times[31] = "7:45";
times[32] = "8:00";
times[33] = "8:15";
times[34] = "8:30";
times[35] = "8:45";
times[36] = "9:00";
times[37] = "9:15";
times[38] = "9:30";
times[39] = "9:45";
times[40] = "10:00";
times[41] = "10:15";
times[42] = "10:30";
times[43] = "10:45";
times[44] = "11:00";
times[45] = "11:15";
times[46] = "11:30";
times[47] = "11:45";
times[48] = "12:00";
times[49] = "12:15";
times[50] = "12:30";
times[51] = "12:45";
times[52] = "13:00";
times[53] = "13:15";
times[54] = "13:30";
times[55] = "13:45";
times[56] = "14:00";
times[57] = "14:15";
times[58] = "14:30";
times[59] = "14:45";
times[60] = "15:00";
times[61] = "15:15";
times[62] = "15:30";
times[63] = "15:45";
times[64] = "16:00";
times[65] = "16:15";
times[66] = "16:30";
times[67] = "16:45";
times[68] = "17:00";
times[69] = "17:15";
times[70] = "17:30";
times[71] = "17:45";
times[72] = "18:00";
times[73] = "18:15";
times[74] = "18:30";
times[75] = "18:45";
times[76] = "18:00";
times[77] = "19:15";
times[78] = "19:30";
times[79] = "19:45";
times[80] = "20:00";
times[81] = "20:15";
times[82] = "20:30";
times[83] = "20:45";
times[84] = "21:00";
times[85] = "21:15";
times[86] = "21:30";
times[87] = "21:45";
times[88] = "22:00";
times[89] = "22:15";
times[90] = "22:30";
times[91] = "22:45";
times[92] = "23:00";
times[93] = "23:15";
times[94] = "23:30";
times[95] = "23:45";
times[96] = "42:00";

function CTime(form)
{
var day = ', этого дня';
var baseCityTime = 30 * parseInt(form.timeChoice.options[form.timeChoice.selectedIndex].value);
var offset = parseInt(form.firstCity.options[form.firstCity.selectedIndex].value ) -
parseInt(form.secondCity.options[form.secondCity.selectedIndex].value);
var selectedCityTime = (baseCityTime - offset) / 30;
var targetTime = parseInt(form.timeChoice.options[form.timeChoice.selectedIndex].value ) +
selectedCityTime;

if (selectedCityTime < 0)
{
selectedCityTime = 48 + selectedCityTime;
day = ', предыдущего дня';
}

else if (selectedCityTime > 47)
{
selectedCityTime = selectedCityTime - 48;
day = ', следующего дня';
}

if (selectedCityTime < 0)
selectedCityTime=selectedCityTime * -1;

form.time.value = times[selectedCityTime * 2] + day;

return false;
}
</script>

<script language="JavaScript">document.write('<small>'+getDateNow()+'</small>')</script>

0

6

Запрос по кнопке.
Укажите в поле необходимый адрес и нажмите кнопку «Пуск» для перехода на этот адрес

я бы не хотел просто так раздавть скрипты гостям, вашей благодарностью будет регистрация на форуме

0

7

Меню выдвигается с верху

0

8

Часы в теге <TITLE>.

0

9

Автоматическая Прокрутка текста в поле ввода.

чтобы увидеть скрипт целиком надо зарегистрироватся

<script language="JavaScript">
<!--
var id;
var msg="текста в поле ввода. ";
function scroll() {
var lchar;
lchar = msg.substring(0,1);

0

10

Cлучайный рисунок при обновлении страницы.

<script language="JavaScript">
<!--
var a=Math.round(Math.random()*2)
image = new Array();
image[0]="Carbon/1.jpg"

0


Вы здесь » КомПик » Скрипты/Шаблоны » Большой сборник скриптов для Форумов и Сайтов