脚本导致重新加载? [英] script causing a reload ?
问题描述
我有这个java脚本页面导致我的html日志中的第二个条目
看起来像这样
" GET /Cart.html HTTP /1.0" 200 5408
" GET /Cart.html? HTTP / 1.0" 200 5408
我不知道为什么第二次获取是在那里,任何想法?
下面的
是一些脚本如果(document.images)
{
pic0off = new Image();
pic0off.src =" /images/bhome.gif"
pic1off = new Image();
pic1off.src =" /images/bmodel.gif"
pic0on = new Image();
pic0on.src =" /images/ohome.gif"
pic1on = new Image();
pic1on.src =" /images/omodel.gif"
}
函数pic_aktiv(imgName)
{
if(document.images)
{
imgOn = eval(imgName +" on.src");
document [imgName] .src = imgOn;
}
}
函数pic_passiv(imgName)
{
if(document.images )
{
imgOff = eval(imgName + " off.src");
document [imgName] .src = imgOff;
}
}
< / SCRIPT>
< A HREF =" /" onMouseOver =" pic_aktiv(''pic0'')"
onMouseOut =" pic_passiv(''pic0'')">< IMG SRC =" / images / bhome。 GIF" NAME =" pic0"
ALT =" Alpha-Omega Productions" WIDTH =" 38" HEIGHT =" 25"
BORDER =" 0">< / A>& nbsp;& nbsp;
< A HREF =" model.htm" onMouseOver =" pic_aktiv(''pic1'')"
onMouseOut =" pic_passiv(''pic1'')">< IMG SRC =" / images / bmodel。 gif"
NAME =" pic1" ALT ="建模与QUOT; WIDTH =" 57" HEIGHT =" 25"
BORDER =" 0">< / A>& nbsp;& nbsp;
-
Chris W
他们可以放弃必要的自由
来获得一点临时安全
既不自由也不安全。
- 本杰明富兰克林,1759年宾夕法尼亚州历史回顾
I have this java script page that causes a second entry in my html logs
that looks like this
"GET /Cart.html HTTP/1.0" 200 5408
"GET /Cart.html? HTTP/1.0" 200 5408
I don''t know why the second get is in there, any ideas?
below is some of the script in question.
<SCRIPT Language = "JavaScript">
if (document.images)
{
pic0off = new Image();
pic0off.src = "/images/bhome.gif"
pic1off = new Image();
pic1off.src = "/images/bmodel.gif"
pic0on = new Image();
pic0on.src = "/images/ohome.gif"
pic1on = new Image();
pic1on.src = "/images/omodel.gif"
}
function pic_aktiv(imgName)
{
if (document.images)
{
imgOn = eval(imgName + "on.src");
document [imgName].src = imgOn;
}
}
function pic_passiv(imgName)
{
if (document.images)
{
imgOff = eval(imgName + "off.src");
document [imgName].src = imgOff;
}
}
</SCRIPT>
<A HREF="/" onMouseOver="pic_aktiv(''pic0'')"
onMouseOut="pic_passiv(''pic0'')"><IMG SRC="/images/bhome.gif" NAME="pic0"
ALT="Alpha-Omega Productions" WIDTH="38" HEIGHT="25"
BORDER="0"></A>
<A HREF="model.htm" onMouseOver="pic_aktiv(''pic1'')"
onMouseOut="pic_passiv(''pic1'')"><IMG SRC="/images/bmodel.gif"
NAME="pic1" ALT="Modeling" WIDTH="57" HEIGHT="25"
BORDER="0"></A>
--
Chris W
"They that can give up essential liberty
to obtain a little temporary safety
deserve neither liberty nor safety."
-- Benjamin Franklin, 1759 Historical Review of Pennsylvania
推荐答案
" Chris W" < 1Q *********** @ cox.net>在留言中写道
新闻:3F *************** @ cox.net ...
"Chris W" <1q***********@cox.net> wrote in message
news:3F***************@cox.net...
我有这个java脚本页面这会在我的html日志中导致第二个条目
" GET /Cart.html HTTP / 1.0" 200 5408
GET /Cart.html? HTTP / 1.0" 200 5408
我不知道为什么第二次获取是在那里,任何想法?
下面是一些有问题的剧本。
< SCRIPT语言=" JavaScript">
if(document.images)
{
pic0off = new Image();
pic0off.src =" / images / bhome.gif"
pic1off = new Image();
pic1off.src =" /images/bmodel.gif"
pic0on = new Image();
pic0on.src =" /images/ohome.gif"
pic1on = new Image();
pic1on.src =" /images/omodel.gif"
}
函数pic_aktiv(imgName)
{
if(document.images)
{
imgOn = eval(imgName +" on.src");
文件[imgName] .src = imgOn;
}
函数pic_passiv(imgName)
{
if(document.images )
{
imgOff = eval(imgName +" off.src");
document [imgName] .src = imgOff;
}
}
< / SCRIPT> ;
< A HREF =" /" onMouseOver =" pic_aktiv(''pic0'')"
onMouseOut =" pic_passiv(''pic0'')">< IMG SRC =" /images/bhome.gif" NAME =" pic0"
ALT =" Alpha-Omega Productions" WIDTH =" 38" HEIGHT =" 25"
BORDER =" 0">< / A>& nbsp;& nbsp;
< A HREF =" model.htm" onMouseOver =" pic_aktiv(''pic1'')"
onMouseOut =" pic_passiv(''pic1'')">< IMG SRC =" /images/bmodel.gif"
NAME =" pic1" ALT ="建模与QUOT; WIDTH =" 57" HEIGHT =" 25"
BORDER =" 0">< / A>& nbsp;& nbsp;
-
Chris W
他们可以放弃必要的自由来获得一点临时安全
既不自由也不安全。
- 本杰明富兰克林,1759宾夕法尼亚州的历史回顾
I have this java script page that causes a second entry in my html logs
that looks like this
"GET /Cart.html HTTP/1.0" 200 5408
"GET /Cart.html? HTTP/1.0" 200 5408
I don''t know why the second get is in there, any ideas?
below is some of the script in question.
<SCRIPT Language = "JavaScript">
if (document.images)
{
pic0off = new Image();
pic0off.src = "/images/bhome.gif"
pic1off = new Image();
pic1off.src = "/images/bmodel.gif"
pic0on = new Image();
pic0on.src = "/images/ohome.gif"
pic1on = new Image();
pic1on.src = "/images/omodel.gif"
}
function pic_aktiv(imgName)
{
if (document.images)
{
imgOn = eval(imgName + "on.src");
document [imgName].src = imgOn;
}
}
function pic_passiv(imgName)
{
if (document.images)
{
imgOff = eval(imgName + "off.src");
document [imgName].src = imgOff;
}
}
</SCRIPT>
<A HREF="/" onMouseOver="pic_aktiv(''pic0'')"
onMouseOut="pic_passiv(''pic0'')"><IMG SRC="/images/bhome.gif" NAME="pic0"
ALT="Alpha-Omega Productions" WIDTH="38" HEIGHT="25"
BORDER="0"></A>
<A HREF="model.htm" onMouseOver="pic_aktiv(''pic1'')"
onMouseOut="pic_passiv(''pic1'')"><IMG SRC="/images/bmodel.gif"
NAME="pic1" ALT="Modeling" WIDTH="57" HEIGHT="25"
BORDER="0"></A>
--
Chris W
"They that can give up essential liberty
to obtain a little temporary safety
deserve neither liberty nor safety."
-- Benjamin Franklin, 1759 Historical Review of Pennsylvania
如果你改变
< A HREF ="
到
< A HREF =" Cart.html"
?
这假设上面的脚本位于购物车中html的"页面和
访客点击该链接。
What happens if you change
<A HREF="/"
to
<A HREF="Cart.html"
?
This presumes that the script above is in the "Cart.html" page and that the
visitor is clicking on that link.
McKirahan写道:
McKirahan wrote:
什么如果您更改
< A HREF =" /"
到
< A HREF =" Cart.html"
?
>这假设上面的脚本位于Cart.html中。页面和
访客点击该链接。
What happens if you change
<A HREF="/"
to
<A HREF="Cart.html"
?
This presumes that the script above is in the "Cart.html" page and that the
visitor is clicking on that link.
我不知道这会改变什么。要获得原始帖子中提到的日志条目,我只需输入
mysite.com/Cart.html即可获得购物车.html然后为我的所有图形提供了一堆
事件,然后终于第二次获得了Cart.html?我不知道为什么?b $ b不知道为什么?加到第二个得到。
-
Chris W
他们可以给必要的自由
获得一点临时安全
应该既不自由也不安全。
- 本杰明富兰克林,1759历史回顾宾夕法尼亚州
I don''t see how that would change anything. To get the log entries I
mentioned in my original post all I have to do is type in
mysite.com/Cart.html and I first get a get for Cart.html then a bunch of
events for all my graphics, then finally a second get for Cart.html? I
don''t know why the ? is added to the second get either.
--
Chris W
"They that can give up essential liberty
to obtain a little temporary safety
deserve neither liberty nor safety."
-- Benjamin Franklin, 1759 Historical Review of Pennsylvania
" Chris W" < 1Q *********** @ cox.net>在消息中写道
新闻:3F *************** @ cox.net ...
"Chris W" <1q***********@cox.net> wrote in message
news:3F***************@cox.net...
McKirahan写道:
McKirahan wrote:
如果你改变
< A HREF =" />
< A HREF =" Cart.html"
?
这假设上面的脚本位于Cart.html中。页面和
访问者点击该链接。
What happens if you change
<A HREF="/"
to
<A HREF="Cart.html"
?
This presumes that the script above is in the "Cart.html" page and that the visitor is clicking on that link.
我不知道这会改变什么。要获得我在原始帖子中提到的日志条目,我所要做的就是输入
mysite.com/Cart.html然后我首先得到一个获取Cart.html然后一堆
所有我的图形事件,然后终于第二次得到Cart.html?我不知道为什么?加入到第二个得到。
-
克里斯W
他们可以放弃必要的自由
获得一点暂时的安全
既不自由也不安全。
- 本杰明富兰克林,1759年宾夕法尼亚州历史回顾
I don''t see how that would change anything. To get the log entries I
mentioned in my original post all I have to do is type in
mysite.com/Cart.html and I first get a get for Cart.html then a bunch of
events for all my graphics, then finally a second get for Cart.html? I
don''t know why the ? is added to the second get either.
--
Chris W
"They that can give up essential liberty
to obtain a little temporary safety
deserve neither liberty nor safety."
-- Benjamin Franklin, 1759 Historical Review of Pennsylvania
我不是知道为什么第二次获得在那里,任何想法?我给了你一个
的想法。
我不知道这会改变什么。 - 我也没有。你试过吗?
"I don''t know why the second get is in there, any ideas?". I gave you an
idea.
"I don''t see how that would change anything." -- nor do I. Did you try it?
这篇关于脚本导致重新加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!