Javascript Quiz

S

Stevo

Osmo said:
Additya kirjoitti:

Didn't see any questions, just a blank page plus a banner on top with
most links broken.

You've probably already got the malware it wanted you to get. You should
be more discriminatory of the links you click on.
 
P

Peter Michaux

Additya kirjoitti:



Didn't see any questions, just a blank page plus a banner on top with
most links broken.

Works for me in Mac Firefox 3.0.15.

Peter
 
T

Thomas 'PointedEars' Lahn

Stefan said:
If you want to see the quiz, you can try the URL from the previous
paragraph. On the other hand, the questions are not very good, and the
whole thing is probably a waste of time for most people here.
An excerpt:

Q5. What is the HTML tag for start of javascript code
A. <js>
B. <javascript>
C. <java>
D. <script>

You snipped answer `E', didn't you?


PointedEars
 
J

Jorge

D would be correct for HTML5.

Yes, and, in addition:

1.- The *tag* is <script>, the type is an *attribute*, isn't it ?
2.- Don't browsers default to type="text/javascript", anyway ?
 
M

Matthias Reuter

Jorge said:
2.- Don't browsers default to type="text/javascript", anyway ?

If I remember correctly, at the time the type attribute was introduced, no
official mime type for java-/ecmascript existed. "text/javascript" seems
to be the most common value, but many more are in use. I think no browser
cares for which value is given, they all assume ecmascript. This is also
true if no type attribute is given.

Therefore, HTML 5 discontinued to have type a required attribute for the
script tag.

In the meantime, RFC 4329 (of April 2006, see
http://www.ietf.org/rfc/rfc4329.txt) defines application/javascript and
application/ecmascript, and obsoletes text/javascript and text/ecmascript.

Matt
 
J

Jorge

(...) A browser could choose to ignore script
elements with type="george/ofTheJungle".

Indeed, I've been scratching my head for quite a while at least once
because I typed <script type="text/javascrpt"> and the browser was
blatantly ignoring that <script>.
 
T

Thomas 'PointedEars' Lahn

Jorge said:
Since when is becoming a standard a prerequisite for something to be ?

With regard to correctness, that is explained in the "Status of this
document" section.


PointedEars
 
L

Lasse Reichstein Nielsen

Jorge said:
Yes, and, in addition:

1.- The *tag* is <script>, the type is an *attribute*, isn't it ?
2.- Don't browsers default to type="text/javascript", anyway ?

If you want to get technical [1], then attributes are part of the
start tag - which is everything between the start-tag-open and
tag-close tokens.

/L
[1] Whoops, no that's me projecting again :)
 
T

Thomas 'PointedEars' Lahn

Peter said:
Sure that validates as HTML syntax but that doesn't mean the page will
behave the way you desired. A browser could choose to ignore script
elements with type="george/ofTheJungle".

And there are widely distributed user agents that ignore `script' elements
where the `type' attribute value is any of "application/javascript" or
"application/ecmascript", so the RFC marking "text/javascript" as obsolete
is only of academical value until that changes (probably by those user
agents reaching their end-of-life and having a tendency to fall into disuse
afterwards.)


PointedEars
 
J

Jorge

Jorge said:
1.- The *tag* is <script>, the type is an *attribute*, isn't it ?
2.- Don't browsers default to type="text/javascript", anyway ?

If you want to get technical [1], then attributes are part of the
start tag (...)

Yes, yes indeed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top