HTML <script> türü Özellik

❮ HTML <script> etiketi

Örnek

Belirtilen tür özniteliğine sahip bir komut dosyası:

<script type="application/javascript">
document.getElementById("demo").innerHTML = "Hello JavaScript!";
</script>

Tanım ve Kullanım

Öznitelik , typekomut dosyasının türünü belirtir.

Nitelik , ve etiketleri typearasındaki içeriği tanımlar . <script></script>


Tarayıcı Desteği

Attribute
type Yes Yes Yes Yes Yes

Sözdizimi

<script type="scripttype">

Özellik Değerleri

Value Description
scripttype Specifies the type of the script.

Some common values:
  • A JavaScript MIME type like: application/javascript (default) or application/ecmascript
  • module:
  • Another MIME type. src attribute will be ignored

Look at IANA Media Types for a complete list of standard media types.


❮ HTML <script> etiketi