Script Attribute Definitions...

G

Guest

Hi,
I am trying to find "clear" definitions of the "type" attribute in the
<script> element.

<script language="javascript" type="text/C#">

Specifically, I am trying to find out:
1) Why it is necessary to specify a "type"? (it seems redundant to
"language").
2) Why am I able to specify a type that I can't specify in the language (see
above).
3) Is it possible to write client side script in C#?
Thanks,
- Mike
 
G

Guest

A type attribute is not required for the script tag. For example,
right-click-view-source on this web page.
 
G

Guest

Brad,
You are correct. When I set it up in the Source view of the .aspx page, it
shows the red squiggle under the script tag and it says that I need to add a
type attribute, but it runs fine without it.
Thanks,
- Mike
 
B

Bruce Barker

in html 4.0 and xhtml the language attribute is obsolete and been replaced
with the type attribute which specifies the language and the encoding (mime
content type). in an html 4.0 compliant browser (which IE isn't) it will
override the any specfieid language attribute.

so if you want to be html 4.0 or xhtml compliant and support non complaint
browers you should specify both.


-- bruce (sqlwork.com)
 

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
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top