Jump to content

JavaScript: Code?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
Chan

Chan

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 204 posts
Is there a difference between:


<script language='JavaScript'


AND


<script type="text/javascript"


??

#2
v0id

v0id

    Retired

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,936 posts
No, not the functionality.
The first one simply uses the name of the scripting language, while the second uses the MIME type of the language. Both will result in Javascript-code afterwards.

More about MIME here.

#3
rameshkumar

rameshkumar

    Newbie

  • Members
  • PipPip
  • 20 posts
[quote name='[QUOTE']v0id;20596[/QUOTE]]No, not the functionality.
The first one simply uses the name of the scripting language, while the second uses the MIME type of the language. Both will result in Javascript-code afterwards.

More about MIME [url=http://en.wikipedia.org/wiki/MIME]here[/url].[/QUOTE]

[QUOTE]Hi v0id;20596;) This is mr ramesh from India I will explain here Javascript and text/javascripts Let see Javascripting It will define out scripting language and text/javascipts It will define Type to out multi part language let see some example here
<html>
<title>
<script language="text/javascript">
</scripts>
<script language="javascript">
IsNumberFuntction()
{
}
</scripts>
[/QUOTE]
Ok Know We have define to out javascriting and text/javascript
;)

#4
v0id

v0id

    Retired

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,936 posts
I don't really understand what you're trying to tell me, Mr. Ramesh Kumar. You're showing exactly what I just told him. You can use both, and both are just used for Javascript code. By the way, your code is filled with errors.

#5
rameshkumar

rameshkumar

    Newbie

  • Members
  • PipPip
  • 20 posts
[quote name='v0id']I don't really understand what you're trying to tell me, Mr. Ramesh Kumar. You're showing exactly what I just told him. You can use both, and both are just used for Javascript code. By the way, your code is filled with errors.[/QUOTE]
[QUOTE]Hi v0id;20633 ;)I telling that Different Between <script language="javascripts">and <script language="text/javascripts"> I am Saying that text/javascripts are working of MIME type and javascripts that are working of scripting method its fineQUOTE]:p

#6
Guest_TriKri_*

Guest_TriKri_*
  • Guests
Why do you have to specify language at all? If you just write <script>, won't the webbrowser automatically assume it is javascript that's comming?

#7
v0id

v0id

    Retired

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,936 posts

"TriKri" said:

Why do you have to specify language at all? If you just write <script>, won't the webbrowser automatically assume it is javascript that's comming?
Some browsers have Javascript as default, if you're just using the script-tag, without specifying the language. I know Internet Explorer did that once, but I don't know about now.
It's usually a good thing to specify the language, it could had been VBScript as well? If so, if you're only using script, without specifying the language, and it thinks it's Javascript, then it would produce errors, because it actually was VBScript.

#8
Frantic

Frantic

    Learning Programmer

  • Members
  • PipPipPip
  • 91 posts
Wow, I tried to follow along in this conversation but the guy above keeps quoting v0id - what are you saying?