HTML <스크립트> 유형 속성

❮ HTML <스크립트> 태그

예시

type 속성이 지정된 스크립트:

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

정의 및 사용

속성 은 type스크립트 유형을 지정합니다.

type속성은 및 태그 사이의 내용을 식별 <script>합니다 </script>.


브라우저 지원

Attribute
type Yes Yes Yes Yes Yes

통사론

<script type="scripttype">

속성 값

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 <스크립트> 태그