JavaScript不能在netscape 7.1上运行 [英] JavaScript doesnt run on netscape 7.1

查看:72
本文介绍了JavaScript不能在netscape 7.1上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我在html中有一些java脚本。它在IE 6.0上运行良好,但

不能在netscape 7.1上运行


有人能告诉我这是什么问题吗?我该怎么解决呢。


这里是网址

http://godot.urol.uic.edu/output.html


提前谢谢。


Gaurav

Hello,

i have some java script with in html. It runs fine on IE 6.0 but
doesnt run on netscape 7.1

Can someone tell me whats the problem ? And how can i solve it.

here is the url

http://godot.urol.uic.edu/output.html

thank you in advance.

Gaurav

推荐答案

Gaurav说:

你好,

我在html中有一些java脚本。它在IE 6.0上运行良好,但
不会在netscape 7.1上运行

有人能告诉我这是什么问题吗?我怎么能解决它。

这里是网址

http://godot.urol.uic.edu/output.html




Netscape 7.1中的错误消息就是o未定义
第127行



一旦使用document.write()更改

的内容页面,整个上一页被删除,包括你的
javascript变量。


我没有看到你的代码比看到的更近

问题,但您可以通过累积要在字符串变量中写入的HTML的所有

来修复它,并且

然后使用document.write()一次,写出那个

变量的值。



The error message in Netscape 7.1 is that "o" is not defined
in line 127.

As soon as you use document.write() to change the contents of
the page, the entire previous page is erased, including your
javascript variables.

I didn''t look at your code any more closely than to see the
problem, but you could probably fix it by accumulating all
of the HTML that you want to write in a string variable, and
then using document.write() once, to write the value of that
variable.


Gaurav写道:
你好,

我在html中有一些java脚本。它在IE 6.0上运行良好,但
不会在netscape 7.1上运行

有人能告诉我这是什么问题吗?我怎么能解决它。

这里是网址

http://godot.urol.uic.edu/output.html

提前谢谢。

Gaurav
Hello,

i have some java script with in html. It runs fine on IE 6.0 but
doesnt run on netscape 7.1

Can someone tell me whats the problem ? And how can i solve it.

here is the url

http://godot.urol.uic.edu/output.html

thank you in advance.

Gaurav




您的标记代码需要先修复。您应引用所有

属性值。
http://www.htmlhelp.org/faq/html/basics.html#quotes

"默认情况下,SGML要求所有属性值都被分隔使用

双引号(...)"
http://www.w3.org/TR/html4/intro/sgm...tml#attributes

为什么属性值应始终以HTML格式引用
http:// www .cs.tut.fi / ~jkorpela / qattr.html

< form>需要一个动作属性。类型不能是数字等...另外,你需要定义一个字符集:
http://www.htmlhelp.com/tools/validator/charset.html

选择doctype声明(最好严格的DTD)如


<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 // EN"

" http:/ /www.w3.org/TR/html4/strict.dtd">


然后定义字符集并最终验证您的文档。一旦

您的文档完全有效,它将适用于所有符合Web标准的符合
标准的浏览器,并且您的网页脚本功能可能会出现问题

使用Doctype声明激活正确的布局模式
http://www.hut.fi/u/hsivonen/doctype.html

W3C验证器
http://validator.w3.org/


为什么我们不会帮助你
http://diveintomark.org/archives/200..._wont_help_you


DU

-

Javascript和浏览器错误:
http://www10.brinkster.com/ doctorunclear /

- Resourc对于Netscape 7.x用户和作曲家的帮助和提示

- 在Netscape 7.x中弹出窗口,音乐(音频/ midi)的交互式演示
http://www10.brinkster.com/doctorunc...e7Section.html



Your markup code needs to be fixed first. You should quote all your
attribute values.
http://www.htmlhelp.org/faq/html/basics.html#quotes
"By default, SGML requires that all attribute values be delimited using
either double quotation marks (...)"
http://www.w3.org/TR/html4/intro/sgm...tml#attributes
Why attribute values should always be quoted in HTML
http://www.cs.tut.fi/~jkorpela/qattr.html
<form> needs an action attribute. type can not be number, etc... Also,
you need to define a charset:
http://www.htmlhelp.com/tools/validator/charset.html
Choose a doctype declaration (preferably strict DTD) like

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

then define the character set and finally validate your document. Once
your document is perfectly valid, it will work in all web standard
compliant browsers and your webpage script functions difficulties can be
fixed with a lot more ease.

Activating the Right Layout Mode Using the Doctype Declaration
http://www.hut.fi/u/hsivonen/doctype.html

W3C validator
http://validator.w3.org/

Why we won''t help you
http://diveintomark.org/archives/200..._wont_help_you

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html


在文章< bl ********** @ news.eusc.inter.net> ;, DU

< dr ******* @ hot-REMOVE-mail.com>写道

< snip>
In article <bl**********@news.eusc.inter.net>, DU
<dr*******@hot-R-E-M-O-V-E-mail.com> writes
<snip>
"默认情况下,SGML要求使用
双引号(...)分隔所有属性值。


然后HTML规范继续说:


在某些情况下,作者可以指定属性的值

没有任何引号。属性值可能只包含

字母(az和AZ),数字(0-9),连字符(ASCII十进制45),

句点(ASCII十进制46),下划线(ASCII十进制95)和

冒号(ASCII十进制58)。我们建议在有可能消除它们时使用引号


http://www.w3.org/TR/html4/intro/sgm...tml#attributes
"By default, SGML requires that all attribute values be delimited using
either double quotation marks (...)"
The HTML spec then goes on to say :

"In certain cases, authors may specify the value of an attribute
without any quotation marks. The attribute value may only contain
letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45),
periods (ASCII decimal 46), underscores (ASCII decimal 95), and
colons (ASCII decimal 58). We recommend using quotation marks even
when it is possible to eliminate them."
http://www.w3.org/TR/html4/intro/sgm...tml#attributes




您至少应该引用最新一期:它现在是HTML 4.01。


< snip>


John

-

John Harris



You should at least quote the latest issue : it''s now HTML 4.01.

<snip>

John
--
John Harris


这篇关于JavaScript不能在netscape 7.1上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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