观众有JavaScript吗? [英] Do viewers have JavaScript?

查看:49
本文介绍了观众有JavaScript吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个依赖于JavaScript的页面。

这是一个问题:观众的浏览器不是运行JavaScript的
吗?


我快速调查了一个名单中的顶部

排名前500的网站 - 我的javascript

关闭了。简单地查看

页面几乎没有问题,但我没有*测试任何动态。


JavaScript几乎用于某些目的

所有页面。只有三分之二的明确

要求打开javascript。


问题:我是否冒了一个页面的风险

*取决于* javascript以获取信息弹出窗口

windows?


Mason C

I am making a page that will depend on JavaScript.
Is this a problem: the viewers'' browser not
running JavaScript?

I did a quick survey of the top of one list of
Top 500 web sites in popularity -- my javascript
turned off. Almost no problem in simply viewing
the pages but I did *not* test any dynamics.

JavaScript was used for some purpose on almost
all the pages. Only two out of thirty explicitly
demanded that javascript be turned on.

QUESTION: Am I running any risk with a page that
*depends* on javascript for informative pop-up
windows?

Mason C

推荐答案

Mason A. Clark< ma ******* @ THISix.netcom.comQQQ>写道:
Mason A. Clark <ma*******@THISix.netcom.comQQQ> wrote:
问题:我是否冒了一个页面的风险
*依赖于javascript来获取信息弹出窗口?
QUESTION: Am I running any risk with a page that
*depends* on javascript for informative pop-up
windows?




是的,从启用JavaScript的事实开始,

浏览器可能已配置为不打开弹出窗口。

即使是Google工具栏也可以。然而,这取决于_how_你试图创建弹出式窗口。


任何_automatic_弹出窗口都会让很多人离开你的网站



_optional_弹出窗口,即在新窗口中打开的链接,是
如果您首先使用href =" ..."创建一个普通链接,那么
风险较小且相当安全,然后添加覆盖正常的JavaScript代码
链接处理并打开一个具有特定属性的新窗口。但是

那么你还需要检查

JavaScript中是否允许新窗口(if(window.open)...)。即使这样,一些弹出预防

可能会打击你。


你真的认为你需要弹出窗口这么糟糕吗?什么是错误的

只是提供信息:将信息包含在页面本身,

或在另一页面上的链接后面。


-

Yucca, http: //www.cs.tut.fi/~jkorpela/

关于网页制作的网页: http://www.cs.tut.fi/~jkorpela/www.html



Yes, starting from the fact that even if JavaScript is enabled, the
browser might have been configured not to open pop-up windows.
Even Google toolbar does that. However this depends on _how_ you try to
create pop-up windows.

Any _automatic_ pop-up windows will make lots of people leave your site
and will be prevented by many programs and settings.

An _optional_ pop-up window, i.e. a link that opens in a new window, is
less risky and can be fairly safe if you first create a normal link,
with href="...", and then add the JavaScript code that overrides normal
link processing and opens a new window with specific properties. But
then you would also need to check whether new windows are allowed in
JavaScript (if(window.open) ...). Even then, some pop-up prevention
might hit you.

Do you really think you need pop-up windows so badly? What''s wrong with
being just informative: include the information onto the page itself,
or behind a link on another page.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


Mason A. Clark写道:
Mason A. Clark wrote:
问题:我是否有任何风险的页面
*取决于* javascript以获取信息弹出
windows?
QUESTION: Am I running any risk with a page that
*depends* on javascript for informative pop-up
windows?




IMO是的。我认为您的网页应该使用Javascript进行*增强*,但

仍可以使用Javascript关闭。随着Javascript转为

关闭,需要额外的往返服务器,而客户端

方Javascript它可以在没有往返的情况下处理客户端。


例如,进行展开/折叠轮廓菜单。启用Javascript

后,您可以使用CSS显示/隐藏子部分并使用Javascript切换

类,而不使用Javascript,服务器应该

显示部分展开的部分,并点击这样的链接

重新加载略微修改的页面以显示或隐藏子部分。我希望我能够理解。


-

Bart。



IMO yes. I think your pages should be *enhanced* with Javascript, but
somehow still work with Javascript turned off. With Javascript turned
off, an extra roundtrip to the server would be needed while with client
side Javascript it can be handled client side without the round trip.

For example, take an expanding/collapsing outline menu. With Javascript
enabled, you can just show/hide subsections with CSS and switching
classes with Javascript, while without Javascript, the server should
show the partially expanded sections, and clicking on such a link would
reload a slightly modified page to show or hide a subsection. I hope I
make some sense.

--
Bart.

Mason A. Clark写道:
Mason A. Clark wrote:
我正在制作一个依赖于JavaScript的页面。
这是一个问题:观众的浏览器没有运行JavaScript ?


是的,如果页面*取决于JavaScript,那么在没有JavaScript支持的情况下,任何浏览器都可能无法访问这些页面



我对一个受欢迎的500强网站列表中的顶部进行了快速调查 - 我的javascript
已关闭。简单地查看页面几乎没有问题,但我没有*测试任何动态。


然后,根据该声明,这些网站不依赖*

javascript,而只是用它来增强网站。 JavaScript应该

总是以一种有利于javascript支持的方式使用,但

不会对那些没有的人产生负面影响。

使用了JavaScript出于某种目的几乎所有的页面。只有三分之二明确要求启用javascript。


这种做法是邪恶的,因为这些消息出现的原因。如果

你访问了我的网站,我要求你配置*你的浏览器

方式*我*喜欢,你真的会留下更多吗?

问题:我在运行任何风险的页面
*取决于* javascript


是的。您可以通过要求启用JavaScript来使某些功能无法访问,或者至少惹恼您的

用户的一小部分。


用于提供信息丰富的弹出窗口?
I am making a page that will depend on JavaScript.
Is this a problem: the viewers'' browser not
running JavaScript?
Yes, if the page *depends* on JavaScript, then it will likely not remain
accessible to any browser without JavaScript support.
I did a quick survey of the top of one list of
Top 500 web sites in popularity -- my javascript
turned off. Almost no problem in simply viewing
the pages but I did *not* test any dynamics.
Then, based on that statement, those sites did not *depend* on
javascript, but merely used it to enhance the site. JavaScript should
always be used in a way that benefits those with javascript support, but
does not negatively affect those without.
JavaScript was used for some purpose on almost
all the pages. Only two out of thirty explicitly
demanded that javascript be turned on.
Such practices are evil for the very reason such messages appear. If
you visited my site and I demanded that you configure *your* browser the
way *I* liked, would you really stick around for more?
QUESTION: Am I running any risk with a page that
*depends* on javascript
Yes. You will either turn away or at least annoy a fraction of your
users by requireing JavaScript to be enabled for some features to be
accessible.
for informative pop-up windows?




您将使用弹出窗口惹恼更多用户。


您应该阅读这个简短的教程,关于你应该如何以及为什么要使用

不引人注目的javascript。我不知道它是否包含任何材料来满足您的特定要求,但它确实包含了一个非常好的

概述良好的脚本实践。
http://www.onlinetools.org/articles/...ivejavascript/

Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ 重新发现网页
http:// GetThunderbird .com / 回收收件箱



You will annoy even more users by using popup windows.

You should read this brief tutorial about how and why you should use
unobtrusive javascript. I don''t know if it will contain any material to
address your particular requirements, but it does contain a very good
overview of good scripting practices.
http://www.onlinetools.org/articles/...ivejavascript/

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox


这篇关于观众有JavaScript吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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