what is the exact use of the "javascript:" in an attribute ?

J

jeanph01

What is the difference between theses two lines :

<tag onclick="some_function()">

and

<tag onclick="javascript:some_function()">

??

In Visual Studio IDE, i get an error if I use the first kind of
instruction but not the second. For me it seem they're the same.

Could you guide me ?

Thank you.
 
E

Evertjan.

jeanph01 wrote on 27 jan 2009 in comp.lang.javascript:
What is the difference between theses two lines :

<tag onclick="some_function()">

and

<tag onclick="javascript:some_function()">

??

There is no difference, and the second is heavily discourged.

No difference, unless in IE you declared VBScript higher up,
but probably even then the function would execute across languages there.
 
J

jeanph01

jeanph01 wrote on 27 jan 2009 in comp.lang.javascript:




There is no difference, and the second is heavily discourged.

No difference, unless in IE you declared VBScript higher up,
but probably even then the function would execute across languages there.

thanks !
 
G

Garrett Smith

jeanph01 said:
What is the difference between theses two lines :

<tag onclick="some_function()">

and

<tag onclick="javascript:some_function()">

That is a labelledStatement for a callExpression.
??

In Visual Studio IDE, i get an error if I use the first kind of
instruction but not the second. For me it seem they're the same.

Could you guide me ?

Don't use Visual Studio IDE!
 

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

No members online now.

Forum statistics

Threads
474,116
Messages
2,570,699
Members
47,274
Latest member
SeleneHgw8

Latest Threads

Top