JavaScript Tutorial/Document/MimeType

Материал из Web эксперт
Перейти к: навигация, поиск

MimeType

The MimeType object is a predefined JavaScript object that you access through the mimeTypes array of the Navigator or Plugin object.

MIME stands for Multipart Internet Mail Extension.

Property/Method Description description Returns description of MimeType enabledPlugin Returns plug-in for specific MimeType suffixes Returns file extension for MimeType type Returns string representation of MimeType



   <source lang="javascript">

<html>

   <head>
   <title> Example of how to determine the available MimeTypes</title>
   </head>
   <body>
   <script language="JavaScript">
   
   </script>
   </body>
   </html></source>
   
  

MimeType.description

The description property gets a description of the data type described by the MimeType object.



   <source lang="javascript">

<html>

   <head>
   <title> Using the description property of the MimeType object</title>
   </head>
   <body>
   <script language="javascript">
   
   </script>
   </body>
   </html></source>
   
  

MimeType.enabledPlugin

The enabledPlugin property determines which plug-in is configured for a specific MIME type.



   <source lang="javascript">

<html>

   <head>
   <title> Using the enabledPlugin property of the MimeType object</title>
   </head>
   <body>
   <script language="javascript">
   
   </script>
   </body>
   </html></source>
   
  

MimeType.suffixes

The suffixes property obtains a string listing the possible file suffixes or filename extensions for the MIME type.



   <source lang="javascript">

<html>

   <head>
   <title> Using the suffixes property of the MimeType object</title>
   </head>
   <body>
   <script language="javascript">
   
   </script>
   </body>
   </html></source>
   
  

MimeType.type

The type property obtains a string specifying the name of the MIME type.



   <source lang="javascript">

<html>

   <head>
   <title> Using the type property of the MimeType object</title>
   </head>
   <body>
   <script language="javascript">
   
   </script>
   </body>
   </html></source>