Snake ........:::::::C++ i Inne:::::::::...........

Forum o programowaniu i nie tylko

Ogłoszenie

Szukamy moderatorów!


#1 2007-10-10 14:33:49

Gorefest

Moderator

Zarejestrowany: 2007-10-10
Posty: 5
Punktów :   

Skrypty na strone

Witam!! A tu gotowce.
Zamieszczam tu skrypty na strone HTML.
Zegarek(BODY)

Kod:

<script language="javascript">
<!--W3e JAVAscript Preset
var timerID = null;
var timerRunning = false;
function stopclock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false;
}

function startclock()
{
    stopclock();
    showtime();
}

function showtime()
{
    var now = new Date();
    var hours = now.getHours();
    var minutes = now.getMinutes();
    var seconds = now.getSeconds();
    var timeValue = "" + ((hours > 12) ? hours - 12 : hours);
    timeValue  += ((minutes < 10) ? ":0" : ":") + minutes;
    timeValue  += ((seconds < 10) ? ":0" : ":") + seconds;
    timeValue  += (hours >= 12) ? " P.M." : " A.M.";
    document.clock.face.value = timeValue;
    timerID = setTimeout("showtime()",1000);
    timerRunning = true;
}
//-->
</script>

<form name="clock" onSubmit="0">
  <input type="text" name="face" size="24">
</form>

<script>startclock();</script>

Data i czas-W znaczniku HEAD

Kod:

<!-- Scripts-->
<script Language="JavaScript">
<!-- Helpers for JSI page...
// Navigation - Start
function goback(){
alert("Good Bye!");
history.go(-1);
}
function gettheDate() {
Todays = new Date();
TheDate = "" + (Todays.getMonth()+ 1) +" / "+ Todays.getDate() + " / " +
Todays.getYear()
document.clock.date.value = TheDate;
}
var timerID = null;
var timerRunning = false;
function stopclock (){
 if(timerRunning)
  clearTimeout(timerID);
 timerRunning = false;
}
function startclock () {
 // Make sure the clock is stopped
 stopclock();
	gettheDate()
	showtime();
}
function showtime () {
	var now = new Date();
	var hours = now.getHours();
	var minutes = now.getMinutes();
	var seconds = now.getSeconds()
	var timeValue = "" + ((hours >12) ? hours -12 :hours)
	timeValue += ((minutes < 10) ? ":0" : ":") + minutes
 timeValue += ((seconds < 10) ? ":0" : ":") + seconds
 timeValue += (hours >= 12) ? " P.M." : " A.M."
	document.clock.face.value = timeValue;
	timerID = setTimeout("showtime()",1000);
	timerRunning = true;
}
// end Helpers -->
</script>

Data i czas-W znaczniku BODY

Kod:

<BODY ONLOAD="startclock()" bgcolor="#FFFFFF">

<table>
<tr>
<td>
<form name="clock" onSubmit="0">
<div align=right>
<input type="text" name="date" size=12 value="">
<input type="text" name="face" size=12 value="">
</div></form>
</td>
</tr>
</table>

Odliczanie jak dlugo jestes na stronie.(BODY)

Kod:

<body onLoad="window.setTimeout('getSecs()',1)">

<script>

//       This script is written by Patrick Meirmans
//       If you want to use it, send me an e-mail at mijter@dds.nl
//       and be sure to include your URL, I'ld like to see how you used it
//       If you have mailed me you are free to change this script
//       anyway you like
//       by the way, my homepage is at:
//       http://www.geocities.com/Nashville/2956/
//       You might want to take a look at it.

startday = new Date();
clockStart = startday.getTime();
function initStopwatch()
{
 var myTime = new Date();
        var timeNow = myTime.getTime();
        var timeDiff = timeNow - clockStart;
        this.diffSecs = timeDiff/1000;
        return(this.diffSecs);
}
function getSecs()
{
        var mySecs = initStopwatch();
        var mySecs1 = ""+mySecs;
        mySecs1= mySecs1.substring(0,mySecs1.indexOf("."));
        document.tijd.hiero.value=mySecs1
        window.setTimeout('getSecs()',1000);
        if (mySecs1==60) {alert("jesteś tutaj już 60 sekund ...") }
        if (mySecs1==333) {alert("jesteś tutaj już 333 sekundy...") }
        if (mySecs1==666) {alert("jesteś tutaj już 666 sekund ...") }
        if (mySecs1==999) {alert("Ciągle jesteś zainteresowany tą stroną; to już 999 sekund...") }
}
//       To get rid of the alerts, you can just delete the three lines above
//       or just one or two of them
//       Change the 333, 666 and 999 to whatever you like
//       For the messages, just change the text between the " "
//       to whatever you like,
//       Have fun!!

</script>
</P>
<P><form name="tijd"><P>
<center>Jesteś tutaj już przez:
<br>
<input size=4 name=hiero>
<br>sekund.
</form>
</center>

Chcecie wiecej?? Piszcie!


Jestem ja i jest cool.

Offline

 

#2 2007-10-10 14:44:53

Snake

Administrator

Zarejestrowany: 2007-10-08
Posty: 7
Punktów :   

Re: Skrypty na strone

Heh, dobra robota. Widać że skopiowane ( ) ale napewno się przyda i przydało by się też więcej skrypcików


Witaj jestem Adminem!

Offline

 

#3 2007-10-10 14:59:13

Gorefest

Moderator

Zarejestrowany: 2007-10-10
Posty: 5
Punktów :   

Re: Skrypty na strone

Ok przyznam sie,skopiowane Ale wazne ze jest
Ok daje wiecej skryptuw.
Fajny bajer ;] lecz dziala tylko w Internet explorerze,Dzialanie-Pokazuje czas w oknie statusu.
W znaczniku HEAD.

Kod:

<!-- Scripts-->
<script Language="JavaScript">
<!-- hide// Navigation - Stop
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " P.M." : " A.M."
//document.clock.face.value = timeValue;
// you could replace the above with this
// and have a clock on the status bar:
window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock () {
// Make sure the clock is stopped
stopclock();
showtime();
}
// un hide --->
</script>

A tu w znaczniku BODY

Kod:

<BODY ONLOAD="startclock()">

A jak ktos chce wiecej,pisac


Jestem ja i jest cool.

Offline

 

#4 2007-10-10 15:18:25

Snake

Administrator

Zarejestrowany: 2007-10-08
Posty: 7
Punktów :   

Re: Skrypty na strone

Mógłbyś je poskładać w jeden post ( edytować pierwszy) wtedy by sie lepiej przeglądało
I nie pisze się skryptuw tylko skryptów


Witaj jestem Adminem!

Offline

 
Copyright by Snake 2007

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi

[ Generated in 0.207 seconds, 10 queries executed ]


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.fms-gdansk.pun.pl www.djronnie.pun.pl www.bakuganmlodziwojownicy.pun.pl www.ksczarniboguniewo.pun.pl www.polishtruckers.pun.pl