Home > Article > Web Front-end > What does type="text/javascript" mean?
"type="text/javascript"" is usually used in conjunction with the script tag to indicate that the text belongs to a javascript script; the type attribute of the script tag is used to set the MIME type of the script and set the type to javascript script Language is used for script execution.
The operating environment of this tutorial: Windows 10 system, JavaScript version 1.8.5, Dell G3 computer.
type="text/javascript"What does it mean
4ec11beb6c39d0703d1751d203c17053
Put between 3f1c4e4b6b16bbbd69b2ee476dc4f83a2cacc6d41bbb37262a98f745aa00fbf0 is the text type (text).
javascript tells the browser that the text inside belongs to javascript script.
The required type attribute specifies the MIME type of the script.
The type attribute identifies the content between the 3f1c4e4b6b16bbbd69b2ee476dc4f83a and 2cacc6d41bbb37262a98f745aa00fbf0 tags.
MIME types consist of two parts: media type and subtype. For JavaScript, the MIME type is "text/javascript".
The syntax is:
<script type="value">
where MIME_type represents the MIME type. Some of the values:
text/javascript
text/ecmascript
application/ecmascript
application/javascript
text/vbscript
[Related recommendations: javascript learning Tutorial】
The above is the detailed content of What does type="text/javascript" mean?. For more information, please follow other related articles on the PHP Chinese website!