HTML CSS Reference/HTML Attributes Reference/src 2

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

"src" Example

   <source lang="html4strict">
   

<HTML> <head><Title>Example For src</Title> <script language="JavaScript1.2" src="myJSfile.js"></script> </head> <BODY> </BODY> </HTML>


     </source>
   
  


"src" is applied to

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | Applied_To |<script> | +----------------+--------------------------------------------------------------+

     </source>
   
  


"src" Syntax and Note

   <source lang="html4strict">

Note:

This attribute is used with the <script> element. It specifies the URL of an external JavaScript file. The file specified must contain the appropriate suffix for JavaScript files (.js).

Syntax:

<script src="value"> . . . </script>


     </source>