переход на Главную страницу...


Cкачать Java скрипты
(1-100)

01   02   03   04   05  
06   07   08   09   10  
11   12   13   14   15  
16   17   18   19   20  
21   22   23   24   25  
26   27   28   29   30  
31   32   33   34   35  
36   37   38   39   40  
41   42   43   44   45  
46   47   48   49   50  
51   52   53   54   55  
56   57   58   59   60  
61   62   63   64   65  
66   67   68   69   70  
71   72   73   74   75  
76   77   78   79   80  
81   82   83   84   85  
86   87   88   89   90  
91   92   93   94   95  
96   97   98   99   100  

бесплатные шаблоны
javascript для html


Java скрипт - Топик Дня (Windows)

Содержимое этой таблицы поместите между <BODY> и </BODY>

 

<body onLoad="totdinit()">






<Script Language="JavaScript">
bver=navigator.appVersion.split(";");
function totdstart(){
if(bver[1].match("5."))
rv=window.showModalDialog( "totd.html",null,"dialogWidth:430px; dialogHeight:280px;center:1; scroll:0;help:0;status:0");
else
rv=window.showModalDialog( "totd.html",null,"dialogWidth:430px; dialogHeight:300px;center:1; scroll:0;help:0");
nd= new Date();
nd.setTime (nd.getTime()+(365*24*60*60*1000));
cdomain = (location.domain) ? location.domain : null;
cpath = (location.domain) ? location.pathname : null;
if (rv!=0)
SetCookie ("totdc", "true", nd, cpath, cdomain);
}

function totdinit(){
if (document.all){
if (GetCookie("totdc")!="true")
totdstart()
else
document.body.insertAdjacentHTML('beforeEnd','<Div Id="etotd" style="width:140;position:absolute;top:0;left:0;  BACKGROUND-COLOR:#B71717;  BORDER-BOTTOM:#5C0000 solid 2px;BORDER-LEFT:#FE5E5E solid 2px;BORDER-RIGHT:#5C0000 solid 2px;BORDER-TOP:#FE5E5E solid 2px;font-family:Arial;font-size:8pt;font-weight:bold; text-align:center;padding-top:2px;  padding-bottom:2px;color:#FFFFFF;cursor:default" onclick="enable()" onmousedown="mover()" onmouseup="mout()" onmouseout="mout()">Включить Топик Дня</Div>');
}
}

function enable(){
DeleteCookie("totdc");
etotd.innerHTML="Топик дня активирован";
setTimeout('etotd.style.visibility="hidden"; totdstart()',1000);
}

function mover(){
etotd.style.borderLeftColor="#5C0000";
etotd.style.borderRightColor="#FE5E5E";
etotd.style.borderBottomColor="#FE5E5E";
etotd.style.borderTopColor="#5C0000";
etotd.style.paddingLeft="1px";
etotd.style.paddingTop="3px";
}

function mout(){
etotd.style.borderLeftColor="#FE5E5E";
etotd.style.borderRightColor="#5C0000";
etotd.style.borderBottomColor="#5C0000";
etotd.style.borderTopColor="#FE5E5E";
etotd.style.paddingLeft="0px";
etotd.style.paddingTop="2px";
}

// Cookie Functions - Second Helping (21-Jan-96)
// Written by: Bill Dortch, hIdaho Design <bdortch@netw.com>
// The following functions are released to the public domain.

function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break; 
}
return null;
}

function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 4) ? argv[5] : false;
document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain));
}

function DeleteCookie(name){
exp=new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie ("name");
document.cookie = name + "=" + cval +"; expires=" + exp.toGMTString();
}

<!--
/* Script by Lefteris Haritou © 1999
http://www.geocities.com/~lef
This script is free as long as 
you keep the above credit
*/
//-->
</Script>

 

Cоздайте новый документ totd.html

 

<HTML>
<HEAD>
<TITLE>Tip of the day</TITLE>
</HEAD>
<Body Bgcolor="#BFBFBF" Text="#000000" style="font-size:10pt;font-family:Arial" onLoad="dspltip()">
<Div style="position:absolute;left:10;top:10; background-color:#808080;text-align:center; width:58;height:79%">
<IMG SRC="totd.gif" WIDTH="23" HEIGHT="31" BORDER="0" style="position:relative;top:18"><BR>
<Span Id="cntr" style="position:relative;  top:140px;font-family:Arial; font-size:10pt;font-weight:bold;color:#FFFFF0">
</Span>
</Div>
<Div style="position:absolute;left:68;top:10; background-color:#FFFFFF;width:346;  height:79%;border:solid 1px #808080">
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<FONT FACE="Times New Roman" SIZE="+1"><B>Did you know that...</B></FONT>
<HR size="1" style="position:relative;top:10">
<Span Id="mtxt" style="position:relative;top:10px;padding:15px 10px 10px 10px;font-family:Arial;font-size:10pt; width:100%;overflow:auto;height:138px">
</Span>
</Div>
<Div style="position:absolute;left:10;top:222;width:100%">
<Input id="dspl1" type="checkbox" checked>&nbsp;<Span onclick="chgstatus()">Show tips at startup</Span><Input type="button" Value="Next Tip" style="width:70;position:relative;left:113; background-color:#BFBFBF; color:#000000;font-family:Arial;font-size:9pt;border:2px outset #FFFFFF" onclick="ntip()"><Input type="button" Value="Close" style="width:70;position:relative;left:123; background-color:#BFBFBF; color:#000000;font-family:Arial;font-size:9pt;border:2px outset #FFFFFF" onclick="endf()">
</Div>

<Script Language="JavaScript">
todmsg=new Array();

// Add below your tips (Do not edit anything above this line !!!!)

todmsg[0]="You can install the \"Tip of the day\" script to your homepage in less than 3 minutes ?"
todmsg[1]="The \"Tip of the day\" Script works in Internet Explorer 4 and Internet Explorer 5 ?"
todmsg[2]="The only file you need to edit to customize the script is the file called totdmsg.js ?"
todmsg[3]="If you un check the \"Show tips at startup\" checkbox a button will be displayed in the top left corner of the Browser the next time you access your page, to allow you to re-enable the \"Tip of the day\" Script ?"
todmsg[4]="The messages are displayed randomly each time you reload the page ?"
todmsg[5]="You can have as many tips as you like (even 10000 and Im not joking) !"
todmsg[6]="You should never place a \" symbol in your Tip description ?<BR>You should first place a backslash \\ before the quotation mark, because else the script will not work. So is you like to type \"My Quote\" type : \\\"My Quote\\\""
todmsg[7]="If a message is too long and does not fit in the screen, a scroll bar is displayed to allow you to view the whole tip ?<BR><BR>Like in this simple example I set up !<BR><BR><BR>See ? No problem !<BR><BR>It works fine :-)"
todmsg[8]="You can use even HTML tags in the tip ?<BR><FONT FACE=\"Arial\" SIZE=\"4\" COLOR=\"#FF0000\"><B><I>See ? Im using HTML code !</I></B></FONT><BR>Just be careful when you use HTML code and put a backslash \\ before all quotation marks that your Tags may have !"
todmsg[9]="It would be nice to put a link back to my page if you use this script ? My page URL is : <A HREF= \"http://www.geocities.com/~lef\">http://www.ge</A>"
todmsg[10]="If all tips are displayed the script starts over again to make the tip rotation infinte ?"
todmsg[11]="You should put each tip description in a separate line and in the format todmsg[x]=\"Tip goes here.....\" ?<BR><BR> [x is a number in ascending order, starting from 0, you can see the todmsg.js file to understand it better]"
todmsg[12]="You should <I><B>not</B></I> contact me regarding any questions for the Script<BR>You can ask for help in the DynamicDrive forums :<A HREF=\"http://www.dynamicdrive.com\">http://w</A> or you can ask for help in the JavaScript news group : <A HREF=\"news://comp.lang.javascript\">news://co</A>"
todmsg[13]="You should type each tip description in a single line and <U><B>never</B></U> press Enter within a description and brake it into 2 rows ! (If a description is broken up in 2 lines, the script will stop working and you will get JavaScript errors)"
todmsg[14]="The \"Tip of the day\" Script starts working after you page finishes loading (to prevent Illegal operations in IE4) ? So if you want to make it faster to display the tip (before you page loads) you could have as an entry HTML page a page with only the script and a plain link to the rest of your pages.<BR><BR>Example : You can have as index.htlm a page wich only contains the code of the scirpt to make sure that the visitor sees the the Tip before entering your page."
todmsg[15]="While the \"Tip of the day\" is displayed the user cannot access your main page, unless he closes the \"Tip of the day\" window of course !"
todmsg[16]="You can use this script as an alternative method to display messages (disclaimers, notices, etc) for your page ? Just edit the file totd.html and replace the phrase \"Did you know that...\" with whatever you like !"
todmsg[17]="After you finish customizing the script and writing your own tips, you should upload the files : totd.html , totd.js, totdmsg.js and totd.gif to your webpage provider and place them all in the same directory !"
todmsg[18]="To insert the \"Tip of the day\" script to your page, you have to :<BR> 1.) Copy and paste everything within the &lt;Script> tags (including the Script tags) from the file index.html <BR> 2.) You should place this : onLoad=\"totdinit()\" in your pages BODY tag<BR><BR>If you have already another onLoad statement in your BODY tag (from another JavaScript) do not put a second statement there because simply it won't work ! Here is what you have to do in that case : <BR>Let's say you have a JavaScript that requires you to place in the BODY tag the statement onLoad=\"init()\" and you like to use the \"Tip of the day\" script too (which requires you to add the onLoad=\"totdinit()\" statement)<BR>You do not place 2 onLoad statements ! Instead you use this : onLoad=\"init();totdinit()\" , which means you place both function calls in the same event handler (onLoad) separated by a semicolon. Same can be used for even more than 2 Scripts, like onLoad=\"init();totdinit();start();go()\" etc...."
todmsg[19]="You can un check the \"Show tips at startup\" checkbox, even if you click on the \"Show tips at startup\" text and not in the checkbox directly !"
todmsg[20]="If the \"Tip of the day\" window is closed by the x in the upper right corner and not from the close button the Script doen't take notice if the checkbox was un checked ! So make sure to close it from the close button if you have un checked the checkbox and do not wish to see any more Tips in the feature !"
todmsg[21]="The number of the tip you are viewing and the whole number of tips available are displayed in the down left edge of the window ? This is done to help you keep track of the tips you read, and off course to be aware how many tips to expect !"
todmsg[22]="There are 23 Tips here (including this one), so you have plenty to read ! :-)"
</Script>
<Script Language="JavaScript">
cnt=0;
todmsg.sort(rndm)

function rndm(a,b){
return (Math.random()-Math.random())
}

function chgstatus(){
if (dspl1.checked)
dspl1.checked=false;
else
dspl1.checked=true;
}

function dspltip(){
mtxt.innerHTML=todmsg[0]
cntr.innerHTML="1/"+todmsg.length
}

function ntip(){
if (cnt<todmsg.length-1)
cnt++;
else
cnt=0;
mtxt.innerHTML=todmsg[cnt];
cntr.innerHTML=(cnt+1)+"/"+todmsg.length
}

function endf(){
if (!dspl1.checked)
window.returnValue=1
else
window.returnValue=0
window.close();
}
</Script>
</BODY>
</HTML>




      
Cкачать Java скрипты
(101-200)

101   102   103   104   105  
106   107   108   109   110  
111   112   113   114   115  
116   117   118   119   120  
121   122   123   124   125  
126   127   128   129   130  
131   132   133   134   135  
136   137   138   139   140  
141   142   143   144   145  
146   147   148   149   150  
151   152   153   154   155  
156   157   158   159   160  
161   162   163   164   165  
166   167   168   169   170  
171   172   173   174   175  
176   177   178   179   180  
181   182   183   184   185  
186   187   188   189   190  
191   192   193   194   195  
196   197   198   199   200  

скачать шаблоны
java script для html
  Книги   Скрипты     Анекдоты   Web Мастеру