HTML代码帮助 [英] HTML Code HELP

查看:47
本文介绍了HTML代码帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将以下代码粘贴到我的

网页的HTLM编辑器中:


< script src =''http:// voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845350&unit=0&key= 470c828c1eed4306eeef1f0c11d4bf45''>< / script>


但是,它将无法正确显示。这正是它显示的内容:


src =''http://voap.weather.com/weather/oap/USFM0004?template = EVNTV& par = 1004845350& unit = 0& key = 470c828c1eed4306eeef1f0c11d4bf45''>< / script>


它应该是一个天气指示器,但它只是显示为代码。

我已经在
上测试了代码http://www.jmarshall.com/easy/html/testbed.html 它很好,

所以我不知道是什么问题。


对于dubm问题很抱歉,但我是HTML的新手。谢谢,


加勒特

解决方案



" Gr8DaddyG" < GA ************* @ sbcglobal.net>在消息中写道

news:9a ************************* @ posting.google.co m ... < blockquote class =post_quotes>我试图将以下代码粘贴到我的
网页的HTLM编辑器中:

< script
src =''http:// voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845

350& unit = 0& key = 470c828c1eed4306eeef1f0c11d4bf45''>< / script>
但是,它将无法正确显示。这正是它显示的内容:


src =''http://voap.weather.com/weather/oap/USFM0004?template = EVNTV& par = 1004845

350& unit = 0& key = 470c828c1eed4306eeef1f0c11d4bf45''>< / script>
它应该是一个天气指示器,但它只是显示为代码。
我已经在
上测试了代码 http:/ /www.jmarshall.com/easy/html/testbed.html 它的发布很好,
所以我不知道是什么问题。

对不起dubm问题,但我是HTML的新手。谢谢,

Garrett




我把你的代码放到一个文本文件中并用MSIE6运行它出现了

很漂亮。我知道MSIE会容忍许多其他的浏览器不能用的东西。您使用的浏览器是什么?


我在过去的几天里都知道这段代码不会验证。


1。必须有这个:< script type =" text / javascript" .....

i有一个类似的问题,我的页面可以在家里在MSIE上正常运行,但是我的

朋友的Netscape不会运行任何脚本,因为我没有

type =" text / javascript"。它没有像你那样显示代码,但是再一次,

您使用的浏览器是什么?


2.验证者不接受foo.htm?var = val& var = val ---它要你

foo.htm?var = val; var = val

i我遇到同样的问题用我的免费页面计数器。我不认为它如果要求作者改变他的所有代码,那么
会对我有所帮助,所以我的页面将会b / b
验证。


也许如果你解决问题1,脚本会正常显示,希望如此,

因为它是一个不错的天气指示器


Toni Mcintyre - < a href =mailto:ed *********** @ sasktel.net> ed *********** @ sasktel.net
http://wildprop.sasktelwebsite.net/4sale/


" Toni Mcintyre" < ED *********** @ sasktel.net>写道:

我把你的代码放到一个文本文件中,并用MSIE6运行它,它出现了很漂亮。


好​​吧,MSIE对文本文件做了奇怪的事情,甚至将它们解释为

HTML文档。无论如何,当我测试OP'< script>如果我允许在我的

浏览器中编写脚本,它会在HTML

文档中创建天气预报。


显然OP在切入和切换方面做错了。粘贴,例如将

的东西粘贴到错误的地方。通过发布他自己的文件的URL,他可以节省每个人的时间。

1.必须这样:< script type =" text /的javascript" .....


嗯,HTML语法需要类型属性_is_。让我们跳过

这是一个违反MIME RFC的尴尬事实,因为

没有注册媒体类型的文本/ javascript。但是......

i有一个类似的问题,我的页面可以在家里在MSIE上正常运行,但是我朋友的Netscape不会运行任何脚本,因为我
没有type =" text / javascript"。


真的吗?这将是令人惊讶的,因为所有具有脚本的浏览器支持我知道默认为JavaScript的浏览器。但是如果使用带有_different_值的类型属性

,则浏览器可能会忽略

脚本元素,因为他们认为脚本是某种未知语言。

2.验证者不接受foo.htm?var = val& var = val


自然它不会,也不会,因为违反了HTML语法。

---它想要你foo.htm?var = val; var = val


废话。验证器不需要任何东西。您是否阅读了

验证器的常见问题解答?你了解它吗?


在HTML中,&作为数据字符的字符应写成& amp;。

i我的免费页面计数器遇到同样的问题。




那'对于免费页面计数器来说,肯定不是最糟糕的问题。

计数器本身就是最糟糕的问题;这是幼稚设计的原型指标,并且比无用数据产生更糟糕。


-

Yucca,< a rel =nofollowhref =http://www.cs.tut.fi/~jkorpela/target =_ blank> http://www.cs.tut.fi/~jkorpela/

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


" Toni Mcintyre" < ED *********** @ sasktel.net>写道:

1.必须有:< script type =" text / javascript" .....




" Jukka K. Korpela" < JK ****** @ cs.tut.fi>发布:

嗯,HTML语法需要类型属性_is_。让我们跳过一个令人尴尬的事实,即它违反了MIME RFC,因为没有注册媒体类型的文本/ javascript。




从未使用过JavaScript我没想过,我原本以为

,到目前为止,它有一个MIME类型,但我看到的只是一个

实验性应用程序/ x-javascript one。


该属性(在脚本元素中)是否特别是MIME类型?

我明白了它在HTML规范中描述为ContentType。数据,as

per RFC2045(电子邮件规范)​​。虽然像按照一样的术语已经

总是意味着喜欢对我来说,而不是与......特别相同。这一切

看起来很可怜​​。


-

如果你坚持通过电子邮件发送给我,请使用回复 - 地址(这是真实的,但暂时是
)。但请回复小组,就像你应该的那样。


这条消息是在没有病毒的情况下发送的,请自行删除一些文件。


I am trying to paste the following code into the HTLM editor of my
webpage:

<script src=''http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845350&unit=0&key= 470c828c1eed4306eeef1f0c11d4bf45''></script>

But, it will not display correctly. Here''s exactly what it displays:

src=''http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845350&unit=0&key= 470c828c1eed4306eeef1f0c11d4bf45''></script>

It''s supposed to be a Weather indicator, but it just shows up as code.
I''ve tested the code at
http://www.jmarshall.com/easy/html/testbed.html and it dislpays fine,
so I don''t know what the problem.

Sorry for the dubm question, but I''m new with HTML. Thanks,

Garrett

解决方案


"Gr8DaddyG" <ga*************@sbcglobal.net> wrote in message
news:9a*************************@posting.google.co m...

I am trying to paste the following code into the HTLM editor of my
webpage:

<script src=''http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845
350&unit=0&key=470c828c1eed4306eeef1f0c11d4bf45''></script>
But, it will not display correctly. Here''s exactly what it displays:

src=''http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845
350&unit=0&key=470c828c1eed4306eeef1f0c11d4bf45''></script>
It''s supposed to be a Weather indicator, but it just shows up as code.
I''ve tested the code at
http://www.jmarshall.com/easy/html/testbed.html and it dislpays fine,
so I don''t know what the problem.

Sorry for the dubm question, but I''m new with HTML. Thanks,

Garrett



I put your code into a text file and ran it with MSIE6 and it came up
beautifully. I am learning that MSIE will tolerate many things that other
browsers won''t. What browser are you using??

I know from the past couple of days that this code won''t validate.

1. MUST HAVE THIS: <script type="text/javascript" .....
i had a similar problem where my page would run fine at home on MSIE, but my
friend''s Netscape wouldn''t run any of the scripts because i didn''t have
type="text/javascript". it didn''t display the code as yours did, but again,
what browser are you using?

2. the validator won''t accept foo.htm?var=val&var=val --- it wants you to
foo.htm?var=val;var=val
i am having the same problem with my free page counter. i don''t think it
would help i if asked the author to change all his code so my page would
validate.

maybe if you addressed issue 1, the script would display properly, hope so,
as it is a nice weather indicator

Toni Mcintyre - ed***********@sasktel.net
http://wildprop.sasktelwebsite.net/4sale/


"Toni Mcintyre" <ed***********@sasktel.net> wrote:

I put your code into a text file and ran it with MSIE6 and it came up
beautifully.
Well, MSIE does odd things with text files, even interpreting them as
HTML documents. Anyway, when I test the OP''s <script> element in an HTML
document, it creates the weather forecast, if I allow scripting in my
browser.

Apparently the OP did something wrong in the cut & paste, e.g. pasted the
stuff into a wrong place. By posting the URL of his own document, he
would have saved everyone''s time.
1. MUST HAVE THIS: <script type="text/javascript" .....
Well, the type attribute _is_ required by HTML syntax. And let us skip
the embarrassing fact that it''s a violation of MIME RFCs, since there is
no registered media type text/javascript. But...
i had a similar problem where my page would run fine at home on MSIE,
but my friend''s Netscape wouldn''t run any of the scripts because i
didn''t have type="text/javascript".
Really? That would be surprising, since all browsers with scripting
support that I know default to JavaScript anyway. But if a type attribute
with a _different_ value is used, then browsers probably ignore the
script element since they think the script is in some unknown language.
2. the validator won''t accept foo.htm?var=val&var=val
Naturally it doesn''t, and mustn''t, since the HTML syntax is violated.
--- it wants
you to foo.htm?var=val;var=val
Nonsense. The validator does not want anything. Did you even read the
validator''s FAQ? Did you understand it?

In HTML, the & character as data character should be written as &amp;.
i am having the same problem with my free page counter.



That''s surely not the worst problem you have with the free page counter.
The counter itself is the worst problem; it''s the archetypal indicator of
childish design and produces worse than useless data.

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


"Toni Mcintyre" <ed***********@sasktel.net> wrote:

1. MUST HAVE THIS: <script type="text/javascript" .....



"Jukka K. Korpela" <jk******@cs.tut.fi> posted:
Well, the type attribute _is_ required by HTML syntax. And let us skip
the embarrassing fact that it''s a violation of MIME RFCs, since there is
no registered media type text/javascript.



Having never used JavaScript I''d not looked into that, I would have thought
that, by now, there was a MIME type for it, but all I see is an
experimental application/x-javascript one.

Is that attribute (in a script element) specifically a MIME type, though?
I see it described in the HTML specifications as a "ContentType" data, "as
per" RFC2045 (en e-mail specification). Though a term like "as per" has
always meant "like" to me, rather than "specifically the same as". It all
seems woefully vague.

--
If you insist on e-mailing me, use the reply-to address (it''s real but
temporary). But please reply to the group, like you''re supposed to.

This message was sent without a virus, please delete some files yourself.


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

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