Управление сценариями просмотра Web-страниц

Пример 3.1

<!- ady@demos.su, Saturday, January 20, 1996 7:23:31 PM->
<!- Demos WWW cover page ->
<TITLE>Welcome to Demos Company - Moscow, Russia</TITLE>
<!- yet another scroller.
(C) 1996 Dmitry Altukhov, ady@demos.su ->
Use this code for whatever purposes... provided that you retain the copyright notice.
I accept no responsibility for any disasters caused by this monster.
Cannot guess any other cool places for scrollers. And MSIE marquee emulation in JS?!
Er... Mozilla clears windows too slow in JS...
<!- roll it
var rate, pos=0;
function roll(){
var loop, top, msg1;
var msg="Hello World";
for(var i=0; i<10; i++){
msg = msg + (" Hello World");
//move on, make a scrolly... and who said that
//scrollers suck?! ;-)
for(loop=0; loop<top; loop++) msg+=""+msg;
msg1=msg.substring (pos, pos+130);
if (pos++ == 130) pos=0;
//come on, the poor thing can"t roll any faster... buy a Ferrari. ;-)
// that"s all folks ;-)
// end ->
<BODY BACKGROUND="back.gif" BGCOLOR="#FFFFFF" TEXT="#000040" LINK="#000080"
VLINK="#400080" ALINK="#FF0000" onLoad="roll()">

Начало  Назад  Вперед

Книжный магазин