What is type="text/javascript ?

Results 1 to 3 of 3

Thread: What is type="text/javascript ?

  1. #1
    Join Date
    Dec 1969

    Default What is type="text/javascript ?

    Hi;<BR><BR>I&#039m a C++ programmer and new to asp. I preffer jscript above vbscript becouse it is almost like C++.<BR>What kond of type jscripts are there ? Like:<BR>&#060;script language="javascript" type="text/javascript"&#062;<BR>I have found, when i in the start of the html i put a function whitout the type then i get errors.<BR><BR>Thanks<BR><BR>

  2. #2
    Richard A. Lowe Guest

    Default It's Mime...

    type="text/JavaScript" is a MIME type - the content type of the script tags. It&#039s also the ECMA (standards body for JavaScript) approved way to identify ECMA Script (as JavaScript). A true ECMA script language does not need the language= attribute, in fact.<BR><BR>I don&#039t know of any other MIME types for JavaScript, but I guess they might be out there.<BR><BR>HTH&#060;<BR>Richard<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: It's Mime...

    FYI xHTML (current html recommendation) requires type="text/javascript" attribute for the script tag. there&#039s also one like application/x-javascript - but that doesn&#039t apply to html/xhtml<BR><BR>j<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts