Przydatne Skrypty
Oto skrypty:
Link do programu pocztowego:
Kod: Zaznacz cały
<A HREF="mailto:ADRES_E-MAIL">Mój E-mail</a>
Status gadu gadu na stronie:
Kod: Zaznacz cały
<img src="http://status.gadu-gadu.pl/users/status.asp?id=NUMER_GADU-GADU&styl=1">
<A href="gg:NUMER_GADU-GADU">Moje Gadu-Gadu</A>
Status ICQ na stronie:
Kod: Zaznacz cały
<img src="http://web.icq.com/whitepages/online?icq=NUMER_ICQ&img=5">
Dodaj stronę do ulubionych:
Kod: Zaznacz cały
<a href=# onClick="window.external.AddFavorite('http://ADRES_TWOJEJ_STRONY', 'TYTUŁ_STRONY')">Dodaj do ulubionych</a>
Ustaw jako stronę startową:
Kod: Zaznacz cały
<a href=# onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://ADRES_TWOJEJ_STRONY'')">Ustaw jako stronę startową</a>
Copyright (DATA SAMA SIĘ ZMIENIA):
Kod: Zaznacz cały
<SCRIPT LANGUAGE="JavaScript">
<!--
//Script created by Ronny Drappier, http://sipreal.com
//Visit http://javascriptkit.com for this script
today=new Date();
y0=today.getFullYear();
// end hiding --->
</SCRIPT><center>Copyright (c) TU_WPISUJESZ_JAKĄŚ_DATĘ-<SCRIPT LANGUAGE="JavaScript">
<!--- Hide from old browsers
document.write(y0);
// end hiding --->
</SCRIPT> </center>
Wyszukiwarka google:
Kod: Zaznacz cały
<SCRIPT Language="JavaScript">
function szukaj(){
if(wyszukiwarka.slowo.value==""){
alert("Wpisz szukane słowo !!!");
}else{
window.open("http://www.google.com/search?q="+wyszukiwarka.slowo.value);
}
}
</SCRIPT>
<form name="wyszukiwarka">
<br /><input type="text" name="slowo"> <input type="button" onclick="szukaj()" value="Szukaj">
</form>
Czy twoja przeglądarka opsługuje Java??:
Kod: Zaznacz cały
<script type="text/javascript" language="JavaScript">
<!--
document.write('Twoja przeglądarka obsługuje JavaScript! To dobrze, bo my lubimy i używamy JavaScript na tej stronie.')
//-->
</script>
<noscript>Oj, Twoja przeglądarka nie radzi sobie z JavaScript, albo wyłączyłeś obsługę w ustawieniach przeglądarki.</noscript>
Kod: Zaznacz cały
<script>
<!-- Script By Robert Clements | www.pumadesign.com
var name = prompt ('Proszę wpisz poniżej swoje imię.','')
if ( name == null )
document.write ('Witaj na mojej stronie!')
else {
document.write ('Witaj na mojej stronie '+name+'!')
}
//-->
</script>
Przywitanie 2:
Kod: Zaznacz cały
<script language="JavaScript">
<!--
var name=prompt("Wpisz swoje imię, proszę.","imię");
var today = new Date ()
var hrs = today.getHours();
document.writeln("<b><font size=4 face='Comic Sans MS'>");
document.writeln("<b>");
if (hrs <= 12)
document.write("Dzień dobry "+name+'!');
else if (hrs <= 18)
document.write("Miłego dnia "+name+'!');
else
document.write("Dobry wieczór "+name+'!'); document.writeln("<br>");
// -->
</script>
Informacje o systemie:
Kod: Zaznacz cały
<SCRIPT Language="JavaScript">
// Detektor Systemowy - v0.1
// Autor: Tomasz Iwanowski
// www.JavaScript.scrypty.com
var data1 = "<div align='center'><center><table border='0' cellpadding='0' cellspacing='0' width='130'><tr><td align='center'><p align='center'><font size='1' face='Verdana'>"
var data2 = "</font></td></tr></table></center></div>"
var odstep = "<div align='center'><center><table border='0' cellpadding='0' cellspacing='0' width='130'><tr><td align='center'><p align='center'><font size='1' face='Verdana'> </font></td></tr></table></center></div>"
document.write(""+data1+"Przeglądarka:"+data2+"");
document.write(""+data1+"<b>"+navigator.appName+"</b>"+data2+"");
document.write(""+odstep+"");
document.write(""+data1+"System Operacyjny:"+data2+"");
document.write(""+data1+"<b>"+navigator.platform+"</b>"+data2+"");
document.write(""+odstep+"");
document.write(""+data1+"Rozdzielczość Ekranu:"+data2+"");
document.write(""+data1+"<b>"+screen.width+"</b>x<b>"+screen.height+"</b>"+data2+"");
</SCRIPT>
Kalendarz:
Kod: Zaznacz cały
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: Scriptbreaker (pieterpareit@hotmail.com ) -->
<!-- Web Site: http://www24.brinkster.com/scriptbreaker -->
<!-- Begin
var now = new Date();
var month_array = new Array("Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień");
document.write("<form name=date_list><table bgcolor=silver><tr><td>");
document.write("<select name=month onchange=change_month(this.options.selectedIndex)>");
for(i=0;i<month_array.length;i++)
{
if (now.getMonth() != i)
{document.write ("<option value="+i+">"+month_array[i]);}
else
{document.write ("<option value="+i+" selected>"+month_array[i]);}
}
document.write("</select>");
document.write("</td><td>");
document.write ("<select name=year onchange=change_year(this.options[this.options.selectedIndex])>");
for(i=1950;i<3000;i++)
{
if (now.getYear() != i)
{document.write("<option value="+i+">"+i);}
else
{document.write("<option value="+i+" selected>"+i);}
}
document.write("</select></td></tr><tr><td colspan=2><center>");
document.write("<table bgcolor=white border=0 cellspacing = 0 cellpading = 0 width=100%><tr bgcolor=gray align=center>");
document.write("<td><font color=silver>M</font></td><td><font color=silver>T</td><td><font color=silver>W</td><td><font color=silver>T</td><td><font color=silver>F</td><td ><font color=silver>S</td><td ><font color=silver>S</td>");
document.write("</tr><tr>");
for(j=0;j<6;j++)
{
for(i=0;i<7;i++)
{
document.write("<td align=center id=d"+i+"r"+j+"></td>")
}
document.write("</tr>");
}
document.write("</table>");
document.write("</center></from></td></tr></table>");
var show_date = new Date();
function set_cal(show_date)
{
begin_day = new Date (show_date.getYear(),show_date.getMonth(),1);
begin_day_date = begin_day.getDay();
end_day = new Date (show_date.getYear(),show_date.getMonth()+1,1);
count_day = (end_day - begin_day)/1000/60/60/24;
input_table(begin_day_date,count_day);
}
set_cal(show_date);
function input_table(begin,count)
{
init();
j=0;
if (begin!=0){i=begin-1;}else{i=6}
for (c=1;c<count+1;c++)
{
colum_name = eval("d"+i+"r"+j);
if ((now.getDate() == c)&&(show_date.getMonth() == now.getMonth())&&(show_date.getYear() == now.getYear())) {colum_name.style.backgroundColor = "blue";colum_name.style.color = "white";};
colum_name.innerText = c;
i++;
if (i==7){i=0;j++;}
}
}
function init()
{
for(j=0;j<6;j++)
{
for(i=0;i<7;i++)
{
colum_name = eval("d"+i+"r"+j);
colum_name.innerText = "-";
colum_name.style.backgroundColor ="";
colum_name.style.color ="";
}
}
}
function change_month(sel_month)
{
show_date = new Date(show_date.getYear(),sel_month,1);
set_cal(show_date);
}
function change_year(sel_year)
{
sel_year = sel_year.value;
show_date = new Date(sel_year,show_date.getMonth(),1);
set_cal(show_date);
}
// End -->
</script>
<p> <p>
Różne kolory tła:
Kod: Zaznacz cały
<script type="text/javascript" language="JavaScript">
<!-- Start of JavaScript code --------
// NewcWare 1997
// Author: Scott Newcomer 3/1997
// Email: nuke@bright.net
//
function setbackground()
{
window.setTimeout( "setbackground()", 2000);
var index = Math.round(Math.random() * 9);
var ColorValue = "#FFFFFF"; // default color - white (index = 0)
if(index == 1)
ColorValue = "#FFC66B";
if(index == 2)
ColorValue = "#FF5500";
if(index == 3)
ColorValue = "#FF6BC6";
if(index == 4)
ColorValue = "#DC00DC";
if(index == 5)
ColorValue = "#4873FF";
if(index == 6)
ColorValue = "#00DCDC";
if(index == 7)
ColorValue = "#00DC49";
if(index == 8)
ColorValue = "#FFFF6B";
if(index == 9)
ColorValue = "";
document.bgColor=ColorValue;
}
//-->
</script>Przykładowy tekst<script type="text/javascript" language="JavaScript">
<!--
setbackground();
//-->
</script>
Hasło:
Kod: Zaznacz cały
<SCRIPT>
function passWord() {
var testV = 1;
var pass1 = prompt('Wpisz hasło dostępu',' ');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1.toLowerCase() == "TU_WPISUJESZ_HASŁO") {
alert('Witam w strefie');
window.open('http://TU_DAJESZ_LINK_GDZIE_MA_KTOŚ_WEJŚĆ_PO_PODANIU_DOBREGO_HASLA');
break;
}
testV+=1;
var pass1 =
prompt('Brak dostępu - Hasło jest niewłaściwe, spróbuj jeszcze raz.','Hasło');
}
if (pass1.toLowerCase()!="password" & testV ==3)
history.go(-1);
return " ";
}
</SCRIPT>
<CENTER>
<FORM>
<input type="button" value="TU_WPISUJESZ_CO_MA_PISAC_NA_PRZYCISKU" onClick="passWord()" class="button">
</FORM>
</CENTER>
Kalendarz 2:
Kod: Zaznacz cały
<script type="text/javascript" language="JavaScript">
<!-- for sucky browsers
//This Java Script is free to the domain. All I ask is you send me an
//email to
//ddelong@csci.csusb.edu to let me know that you will be using it. This
//message must be included with the script if you copy it.
Months = new Array(12);
Months[0] = "Styczeń";
Months[1] = "Luty";
Months[2] = "Marzec";
Months[3] = "Kwiecień";
Months[4] = "Maj";
Months[5] = "Czerwiec";
Months[6] = "Lipiec";
Months[7] = "Sierpień";
Months[8] = "Wrzesień";
Months[9] = "Październik";
Months[10] = "Listopad";
Months[11] = "Grudzień";
function PadSpaces(TheString)
{
var Spaces = " ";
len = Math.round((9 - TheString.length)/2);
return Spaces.substring(0,len) + TheString;
}
function NumLeapYears(StartYear, EndYear)
{
var LeapYears, i;
if (EndYear >= StartYear){
for(LeapYears = 0; StartYear <= EndYear; StartYear++)
if (IsLeapYear(StartYear)) LeapYears++;
}else{
for(LeapYears = 0; EndYear <= StartYear; EndYear++)
if (IsLeapYear(EndYear)) LeapYears++;
}
return LeapYears;
}
function IsLeapYear(Year)
{
if(Math.round(Year/4) == Year/4){
if(Math.round(Year/100) == Year/100){
if(Math.round(Year/400) == Year/400)
return true;
else return false;
}else return true;
}
return false;
}
function Trim(TheString)
{
var len;
len = TheString.length;
while(TheString.substring(0,1) == " "){ //trim left
TheString = TheString.substring(1, len);
len = TheString.length;
}
while(TheString.substring(len-1, len) == " "){ //trim right
TheString = TheString.substring(0, len-1);
len = TheString.length;
}
return TheString;
}
function DetermineMonthIdx()
{
var i, month, month_s, len;
month = Trim(document.calform.elements[4].value);
len = month.length;
for( i = 0; i <12; i++){
month_s = Months[i].substring(0,len);
if (month_s.toUpperCase() == month.toUpperCase())
return (i);
}
return -1;
}
function FindNewYearStartingDay(Year)
{
var LeapYears, Years, Day;
LeapYears = NumLeapYears(1995, Year);
if (Year >=1995)
Years = (Year -1995)+LeapYears;
else Years = (Year -1995)-LeapYears;
if (Year >=1995)
Day = Math.round(((Years/7 - Math.floor(Years/7))*7)+.1);
else Day = Math.round(((Years/7 - Math.ceil(Years/7))*7)-.1);
if (Year >=1995){
if(IsLeapYear(Year)) Day--;
}else Day += 7;
if(Day < 0) Day = 6;
if(Day > 6) Day = 0;
return Day;
}
function FindNumDaysInMonth(Year, Month)
{
if(Month == 1){
if(IsLeapYear(Year)) return 29;
else return 28;
}else{
if(Month >6) Month++;
if(Month/2 == Math.round(Month/2)) return 31;
}
return 30;
}
function FindMonthStartDay(NewYearDay, Year, Month)
{
var MonthStartDay;
AddArray = new Array(12);
AddArray[0]=0;AddArray[1]=3;AddArray[2]=3;AddArray[3]=6;
AddArray[4]=1;AddArray[5]=4;AddArray[6]=6;AddArray[7]=2;
AddArray[8]=5;AddArray[9]=0;AddArray[10]=3;AddArray[11]=5;
MonthStartDay = NewYearDay + AddArray[Month];
if(IsLeapYear(Year) && (Month ) > 1) MonthStartDay ++;
if (MonthStartDay > 6) MonthStartDay -= 7;
return MonthStartDay;
}
function FillCalendar()
{
var Year, Month, Midx, NewYearDay, MonthStartDay;
var NumDaysInMonth, i, t;
Year = parseFloat(document.calform.elements[1].value);
Month = document.calform.elements[4].value;
Midx = DetermineMonthIdx();
if (Midx == -1){
alert ("Can't recognize that month");
return;
}
NewYearDay = FindNewYearStartingDay(Year);
MonthStartDay = FindMonthStartDay(NewYearDay, Year, Midx);
NumDaysInMonth = FindNumDaysInMonth(Year, Midx);
for(i = 6; i < 43; i++){
t = i-5-MonthStartDay;
if ( t >= 1 && t <= NumDaysInMonth)
document.calform.elements[i].value =t;
else document.calform.elements[i].value = "";
}
}
function IncDecYear(val)
{
var valNum = parseInt(val);
var valNum2 = parseInt(document.calform.elements[1].value)
document.calform.elements[1].value = valNum2 + valNum;
FillCalendar()
}
function IncDecMonth(val)
{
var valNum = parseInt(val);
var Midx = DetermineMonthIdx();
Midx += valNum;
if(Midx > 11) Midx = 0;
if(Midx < 0) Midx = 11;
document.calform.elements[4].value = PadSpaces(Months[Midx]);
FillCalendar()
}
// -->
</script><table border="0" bgcolor="#006296"><tr><td align="center">
<table border="0" cellspacing="0">
<form name="calform">
<tr><td align="center" bgcolor="#006296"><input type="button" value="<<" onClick="IncDecYear(-1)"></td>
<th bgcolor="#007AB9" colspan="5" align="center"><input size="4" type=text value="1993"></th>
<td align="center" bgcolor="#006296"><input type="button" value=">>" onClick="IncDecYear(1)"></td></tr>
<tr><td align="center" bgcolor="#006296"><input type="button" value="<<" onClick="IncDecMonth(-1)"></td>
<th bgcolor="#007AB9" colspan="5" align="center"><input size="9" type="text" value=" January "></th>
<td align="center" bgcolor="#006296"><input type="button" value=">>" onClick="IncDecMonth(1)"></td></tr>
<tr><th bgcolor="#FF5500">Ni</td>
<th bgcolor="#00AAFF">Po</td>
<th bgcolor="#00AAFF">Wt</td>
<th bgcolor="#00AAFF">Śr</td>
<th bgcolor="#00AAFF">Cz</td>
<th bgcolor="#00AAFF">Pi</td>
<th bgcolor="#00AAFF">So</td></tr>
<tr><td bgcolor="#FF5500"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td></tr>
<tr><td bgcolor="#FF5500"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td></tr>
<tr><td bgcolor="#FF5500"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td></tr>
<tr><td bgcolor="#FF5500"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td></tr>
<tr><td bgcolor="#FF5500"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#00AAFF" ><input type=text size=2></td></tr>
<tr><td bgcolor="#FF5500"><input type=text size=2></td>
<td bgcolor="#00AAFF"><input type=text size=2></td>
<td bgcolor="#007AB9" colspan=5><input type=text></td></tr>
</form>
</table>
</td></tr></table>
<script type="text/javascript" language="JavaScript">
<!--
//include this script segment if you want to set the calendar to today's date.
//this MUST come after the tabled form which contains the calendar
//set calendar to today's date
myDate = new Date();
var Month = parseInt(myDate.getMonth());
document.calform.elements[1].value = myDate.getYear();
document.calform.elements[4].value = PadSpaces(Months[Month]);
document.calform.elements[43].value = "Dzisiaj: " +
myDate.getDate() + " " + Months[Month].substring(0,3)
+ ", " + (myDate.getYear());
FillCalendar();
// -->
</script>
Licznik 1:
2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie(name) {
var exp = new Date();
FixCookieDate (exp); // Correct for Mac bug
exp.setTime (exp.getTime() - 1); // This cookie is history
var cval = GetCookie (name);
if (cval != null)
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var expdate = new Date();
var num_visits;
expdate.setTime(expdate.getTime() + (5*24*60*60*1000));
if (!(num_visits = GetCookie("num_visits")))
num_visits = 0;
num_visits++;
SetCookie("num_visits",num_visits,expdate);
//-->
Formularz Kontaktowy:
Kod: Zaznacz cały
<script type="text/javascript" language="JavaScript">
<!--
function msg() {
document.mailer.action = "mailto:"
mailtoandsubject = ((document.mailer.mailtoperson.options[document.mailer.mailtoperson.selectedIndex].value) + '?subject=' + document.mailer.subject.value);
}
// -->
</script><form name="mailer" method="post" action="" enctype="text/plain" onsubmit="(document.mailer.action += mailtoandsubject)">
<table border="0">
<tr valign="top">
<td>Odbiorca:</td>
<td>
<select name="mailtoperson" onchange="msg(this.form)">
<option value="">Wybierz odbiorcę...
<option value="ADRES_E_MAIL_ODBIORCY">NICK_LUB_IMIE_ODBIORCY
<option value="ADRES_E_MAIL_ODBIORCY">NICK_LUB_IMIE_ODBIORCY
</select>
</td>
</tr>
<tr valign="top">
<td>Twoja nazwa:</td>
<td>
<input type="text" size="45" name="name" onchange="msg(this.form)">
</td>
</tr>
<tr valign="top">
<td>Twój adres:</td>
<td>
<input type="text" size="45" name="email" onchange="msg(this.form)">
</td>
</tr>
<tr valign="top">
<td>Priorytet:</td>
<td>
<select name="priority" onchange="msg(this.form)">
<option value="Normal">Normalny
<option value="Urgent">Pilny!
<option value="No Reply Needed">Mało ważny
</select></td>
</tr>
<tr valign="top">
<td>Temat:</td>
<td><input type="text" size="45" name="subject" onchange="msg(this.form)"></td>
</tr>
<tr valign="top">
<td>Treść wiadomości:</td>
<td>
<textarea name="message" cols="45" rows="7" wrap="virtual" onchange="msg(this.form)">
</textarea>
</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Wyślij wiadomość">
<input type="reset" value="Od nowa"></td>
</tr>
</table>
</form>
Wyszukiwarka słów na stronie:
Kod: Zaznacz cały
<script>
<!-- Hide from old browsers
// revised by Alan Koontz -- 9/18/02
var TRange = null;
var win = null;
var frameval = false;
// SELECTED BROWSER SNIFFER COMPONENTS DOCUMENTED AT
// http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
var nom = navigator.appName.toLowerCase();
var agt = navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_ie = (agt.indexOf("msie") != -1);
var is_ie4up = (is_ie && (is_major >= 4));
var is_nav = (nom.indexOf('netscape')!=-1);
var is_nav4 = (is_nav && (is_major == 4));
var is_mac = (agt.indexOf("mac")!=-1);
var is_gecko = (agt.indexOf('gecko') != -1);
// GECKO REVISION
var is_rev=0
if (is_gecko) {
temp = agt.split("rv:")
is_rev = parseFloat(temp[1])
}
// USE THE FOLLOWING VARIABLE TO CONFIGURE FRAMES TO SEARCH
// (SELF OR CHILD FRAME)
// If you want to search another frame, change "self" below to
// parent.frames["thisframe"]
// where "thisframe" is the name of the target frame
// eg: var frametosearch1 = parent.frames["thisframe"]
var frametosearch1 = self
function search(whichform, whichframe) {
// TEST FOR IE5 FOR MAC (NO DOCUMENTATION)
if (is_ie4up && is_mac) return;
// TEST FOR NAV 6 (NO DOCUMENTATION)
if (is_gecko && (is_rev <1)) return;
// INITIALIZATIONS FOR FIND-IN-PAGE SEARCHES
if(whichform.findthis.value!=null && whichform.findthis.value!='') {
str = whichform.findthis.value;
if(whichframe!=self)
frameval=true; // this will enable Nav7 to search child frame
win = whichframe;
}
else return; // i.e., no search string was entered
var strFound;
// NAVIGATOR 4 SPECIFIC CODE
if(is_nav4 && (is_minor < 5)) {
strFound=win.find(str); // case insensitive, forward search by default
// There are 3 arguments available:
// searchString: type string and it's the item to be searched
// caseSensitive: boolean -- is search case sensitive?
// backwards: boolean --should we also search backwards?
// strFound=win.find(str, false, false) is the explicit
// version of the above
// The Mac version of Nav4 has wrapAround, but
// cannot be specified in JS
}
// NAVIGATOR 7 SPECIFIC CODE (WILL NOT WORK WITH NAVIGATOR 6)
if (is_gecko && (is_rev >= 1)) {
if(frameval!=false) win.focus(); // force search in specified child frame
strFound=win.find(str, false, false, true, false, frameval, false);
// There are 7 arguments available:
// searchString: type string and it's the item to be searched
// caseSensitive: boolean -- is search case sensitive?
// backwards: boolean --should we also search backwards?
// wrapAround: boolean -- should we wrap the search?
// wholeWord: boolean: should we search only for whole words
// searchInFrames: boolean -- should we search in frames?
// showDialog: boolean -- should we show the Find Dialog?
}
if (is_ie4up) {
// EXPLORER-SPECIFIC CODE
if (TRange!=null) {
TRange.collapse(false)
strFound=TRange.findText(str)
if (strFound) TRange.select();
}
if (TRange==null || strFound==0) {
TRange=win.document.body.createTextRange()
strFound=TRange.findText(str)
if (strFound) TRange.select();
}
}
if (!strFound) alert ("Hasła '"+str+"' nie można odnaleść!") // string not found
}
// -->
</script>
<!-- EXAMPLE FORM OF FIND-IN-PAGE SEARCH USING SUBMIT (ALLOWING 'ENTER/RETURN' KEY PRESS EVENT) -->
<form name="form1" action="" onSubmit="search(document.form1, frametosearch1); return false"><input type="text" name="findthis" size="15"> <input type="submit" value="Szukaj"></form>
Zegarek:
Kod: Zaznacz cały
<script language="JavaScript">
/**********************************************************************************
* copyright 1999 William Goudy
* http://www.goudy.net - personal
* http://www.goudy.net/fms - Design Business
* william@goudy.net - Email (feel free to email me)
**********************************************************************************/
function MakeArrayday(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}
function MakeArraymonth(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}
function funClock() {
if (!document.layers && !document.all)
return
var runTime = new Date();
var hours = runTime.getHours();
var minutes = runTime.getMinutes();
var seconds = runTime.getSeconds();
var dn = "AM";
if (hours > 24)
{dn = "PM";
hours = hours - 24; }
if (hours == 0)
hours = 24;
if (minutes <= 9)
minutes = "0" + minutes;
if (seconds <= 9)
seconds = "0" + seconds;
movingtime = "<b>"+ hours + ":" + minutes + ":" + seconds + " </b>";
if (document.layers)
{document.layers.go.document.write(movingtime);
document.layers.go.document.close();}
else if (document.all)
go.innerHTML = movingtime;
setTimeout("funClock()",1000)
}
window.onload = funClock;
</SCRIPT>
<span id="go" style="position: absolute;"></span>
Za niedługo dopisze coś...