Автор Тема: Помогите найти ошибку в тексте  (Прочитано 2134 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн DAL

  • Mодератор
  • Постоялец
  • ***
  • Сообщений: 171
  • +0/-0
  • 2
    • Просмотр профиля
    • http://i85.port5.com/
Помогите найти ошибку в тексте
« : 05 Августа 2003, 23:48:27 »
Вот тут ( http://cpclzu.bn.by/daniva/ ) есть скрипт (если нажать на картинку с коробками, то какртинка должна медленно подняться вверх, а на её месте появится другая. Как это можно сдлеать?

Я сделал скрипт, но не могу понять почему он не пашет???

	
function 
checkBrowser(){
	
this.ver=navigator.appVersion
	
this.dom=document.getElementById?1:0
	
this.ie5=(this.ver.indexOf("MSIE 5")>-&& this.dom)?1:0;
	
this.ie4=(document.all && !this.dom)?1:0;
	
this.pc=(navigator.appVersion.indexOf("Mac") == -1)
	
this.iepc=(this.pc &&  (this.ie4 || this.ie5)==1)
	
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	
this.ns4=(document.layers && !this.dom)?1:0;
	
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	
return 
this
}

bw=new checkBrowser()
//Moves a layer to left and top coordinates
function move(d,t,div,nest){ 
	
obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0
	
obj.bottom=d;
	
obj.top=t;
}
	

	

	
var 
0;
	
var 
dest 0;
	
var 
distance 0;
	
var 
step 0;
	
var 
destination 0;

<!--

function 
scrollit(destination) {

	
	
step 1;

	
	
dest destination;

	
	
if (
y<dest) {

	
	
	
while (
y<dest) {

	
	
	
	
step += (step 2000);

	
	
	
	
+= step;

	
	
	
	
scroll(y,0);

	
	
	


	
	
	
scroll(dest,0);

	
	
	
dest;

	
	
}

    
	
if (
dest)  {

	
	
	
while (
y>dest) {

	
	
	
	
step += (step 2000);

                if(
>= (0+step))
	
	
	
	
  {
	
	
	
	
    
-= step
	
	
	
	
	
scroll(y,0);
                  }
	
	
	
	
    else { break;  }
	
	
	


	
	
	
if(
dest >= 0) { scroll(dest,0); }

	
	
	
dest;

	
	
}

	
	
if (
y<1) {y=1}

}


Помогите решить задачку.

С Уважением.

Оффлайн Макс

  • vir magni ingenii
  • Глобальный модератор
  • Ветеран
  • *****
  • Сообщений: 3534
  • +0/-0
  • 2
    • Просмотр профиля
Помогите найти ошибку в тексте
« Ответ #1 : 06 Августа 2003, 01:31:17 »
1. Как выглядит функция scroll(y,0); ?
2. Расскажи, как ты отлаживаешь скрипты ? :)
First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack. ( George Carrette )

 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28