HTML <script> type Attribuut
Voorbeeld
Een script met het opgegeven type attribuut:
<script type="application/javascript">
document.getElementById("demo").innerHTML = "Hello JavaScript!";
</script>
Definitie en gebruik
Het type
attribuut specificeert het type script.
Het type
attribuut identificeert de inhoud tussen de
<script>
en </script>
tags.
Browserondersteuning
Attribute | |||||
---|---|---|---|---|---|
type | Yes | Yes | Yes | Yes | Yes |
Syntaxis
<script type="scripttype">
Attribuutwaarden
Value | Description |
---|---|
scripttype | Specifies the type of the script. Some common values:
Look at IANA Media Types for a complete list of standard media types. |
❮ HTML <script>-tag