DANS LA PARTIE <BODY>
<script
language="JavaScript"><!--
// Hide from old browsers
scroll
var tickertapeform
tt_speed=350
tt_len=35
tt_space=" "
tt_tid = 0;
tt_message="."
tt_c= -tt_len;
function move() {
cend=Math.min(tt_c+tt_len,tt_message.length)
if (tt_c <0)
cstart=0;
else
cstart=tt_c;
if (tt_c < 0)
tt_f.scroll.value=tt_space.substring(0,-tt_c) + tt_message.substring(cstart,cend)
else
tt_f.scroll.value=tt_message.substring(cstart,cend)
tt_c = tt_c +1;
if (tt_c ==
tt_message.length ) tt_c = -tt_len;
tt_tid=window.setTimeout("move()",tt_speed);
}
function tt_start(x) {
tt_f=x
tt_tid=window.setTimeout("move()",tt_speed);
}
function tt_cleartid()
{
window.clearTimeout(tt_tid);
}
function ticker(m,l,s)
{
tt_message=m
tt_len=l
tt_speed=s
document.write('<FORM name=tickertapeform><input name=scroll size=')
document.write(tt_len)
document.write(' value=""></FORM>')
tt_start(document.tickertapeform);
}
function ticker(m)
{
tt_message=m
tt_len=35
tt_speed=150
document.write('<FORM name=tickertapeform><input name=scroll
size=35></FORM>');
tt_start(document.tickertapeform);
}
deb= new Date();
refdeb=deb.getTime();
sec="";
minut="";
heur="";
delta="";
function aff(){
var fin= new Date();
var reffin=fin.getTime();
delta=Math.round((reffin-refdeb)/1000);
heur=Math.floor(delta/60/60);
minut=Math.floor(delta/60-60*heur);
sec=Math.floor(delta-60*minut-3600*heur);
alert("Tu as mis "+sec+" secondes pour lire cette page \nCeci est juste un
SPEEDtest...\nUn bon script non ?...");
}
// Stop hiding from old browsers
// --></script>
Mais aussi dans la
ligne body :
onunload="aff()"
|