java popup停止GIF动画? [英] java popup stops GIF anims?

查看:70
本文介绍了java popup停止GIF动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨....


我有一个小的javascript弹出框,人们点击它打开一个

信息面板。


我在页面上制作了一些闪烁的星形动画,在弹出窗口被激活后停止闪烁 - 并保持关闭状态。即使弹出窗口已经关闭了




对此有什么修复?


这里是弹出窗口代码:


函数openit(){

newWindow = window.open(''popups / newsflash.htm'',''newWindow'',

''resizable,width = 550,height = 550,scrollbars = yes,res izable = yes,left = 100,top = 10

0'');


这里是锚码:


< a href =" javascript :openit(); ">< font color ="#FFFF99">< strong> NEWS

FLASH !!< / strong>< / font>< / a>< / div>

感谢任何建议..


Eugene

解决方案

2004年1月28日星期三00:32:43 GMT,Eugene< lo ** @ life.com>写道:

嗨....

我有一个小的javascript弹出框,人们点击它打开一个
信息面板。

在弹出窗口激活后,我在页面上制作了一些闪烁的星形动画,然后保持关闭状态。即使关闭了
弹出窗口。

对此有什么修复?




可能是因为你使用的是JavaScript伪协议。当你点击一个链接时,浏览器希望页面改变,所以它会停止像GIF动画一样的事情。只有一个真正的理由使用JavaScript

伪协议[1],而你并没有以这种方式使用它。


我会建议将HTML更改为:


< a href =" newsflash.html"

onclick =" openit(); return false;" ;>新闻Flash< / a>


其中newsflash.html提供另一种非JavaScript [2]方法

阅读新闻 flash。


我还建议更新您的页面以使用样式表而不是

弃用的表现元素如FONT,但这与
你的问题。


Mike


[1]使用bookmarklet。

[ 2]那样,我的意思是没有任何JavaScript。只有禁用JavaScript

的人才会阅读该页面,所以包含

JavaScript是没有意义的。


-

Michael Winter
M.******@blueyonder。 co.inva lid(将.invalid替换为.uk以回复)


Eugene写道:

嗨....
这里是锚码:

< a href =" javascript :openit();" ;>< font color ="#FFFF99">< strong> NEWS
FLASH !!< / strong>< / font>< / a>< / div>


http://www.jibbering.com/常见问题/#FAQ4_24


javascript的一个副作用 :URL'是他们杀死了动画

gifs。


-

兰迪

机会有利于准备介意

comp.lang.javascript常见问题 - http://jibbering.com / faq /


" Eugene" <螺** @ life.com>在消息中写道

news:LqDRb.19317


Hi....

I have a little javascript popup box that people click on to open up an
information panel.

I made some little blinking star anims on the page that stop blinking after
the popup has been activated - and stay "off" even after the popup is
closed.

any fix for this?

Here''s the popup code:

function openit() {
newWindow = window.open(''popups/newsflash.htm'', ''newWindow'',
''resizable,width=550,height=550,scrollbars=yes,res izable=yes,left=100,top=10
0'');

Here''s the anchor code:

<a href="javascript:openit();"><font color="#FFFF99"><strong>NEWS
FLASH!!</strong></font></a></div>
thanks for any suggestions..

Eugene

解决方案

On Wed, 28 Jan 2004 00:32:43 GMT, Eugene <lo**@life.com> wrote:

Hi....

I have a little javascript popup box that people click on to open up an
information panel.

I made some little blinking star anims on the page that stop blinking
after the popup has been activated - and stay "off" even after the
popup is closed.

any fix for this?



Probably because you are using the JavaScript pseudo-protocol. When you
click a link, the browser expects the page to change, so it stops things
like GIF animation. There is only one real reason to use the JavaScript
pseudo-protocol[1], and you aren''t using it in that way.

I would recommend changing the HTML to:

<a href="newsflash.html"
onclick="openit();return false;">News Flash</a>

where newsflash.html provides an alternate, non-JavaScript[2] method of
reading the "news flash".

I would also recommend updating your page to use style sheets instead of
deprecated presentational elements like FONT, but this has no bearing on
your problem.

Mike

[1] For using bookmarklets.
[2] By that, I mean no JavaScript whatsoever. Only people with JavaScript
disabled will be reading that page, so there''s no point in including
JavaScript.

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)


Eugene wrote:

Hi....
Here''s the anchor code:

<a href="javascript:openit();"><font color="#FFFF99"><strong>NEWS
FLASH!!</strong></font></a></div>



http://www.jibbering.com/faq/#FAQ4_24

One of the side effects of javascript: URL''s is that they kill animated
gifs.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/


"Eugene" <lo**@life.com> wrote in message
news:LqDRb.19317


这篇关于java popup停止GIF动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆