HTML CSS Reference/HTML Tag Reference/script

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

"script" CSS Attributes and JavaScript Style Properties

   <source lang="html4strict">

Names noted with an asterisk (*) are JavaScript properties only. +----------------+--------------------------------------------------------------+ | CSS |background-position-x background-position-y | | Attributes |behavior layout-grid | | and |layout-grid-mode pixelBottom(*) | | JavaScript |pixelHeight(*) pixelLeft(*) | | Style |pixelRight(*) pixelTop(*) | | Properties |pixelWidth(*) posBottom(*) | | |posHeight(*) posLeft(*) | | |posRight(*) posTop(*) | | |posWidth(*) text-autospace | | |text-underline-position | +----------------+--------------------------------------------------------------+

     </source>
   
  


"script" Event Handlers

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | Event |onLoad onPropertyChange | | Handlers |onReadyStateChange | +----------------+--------------------------------------------------------------+

     </source>
   
  


"script" Example

   <source lang="html4strict">
   

<html> <head> <title>script element example</title>

   <script language="javascript" src="yourlinkedjavascriptfile.js">
   </script>
   <script id="script1" language="javascript">
   
   </script>

</head> <body>

   <script id="script2" language="javascript">
   
   </script>

</body> </html>


     </source>
   
  


"script" HTML Attributes

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | HTML |charset defer | | Attributes |event for | | |id lang | | |language src | | |type | +----------------+--------------------------------------------------------------+

     </source>
   
  


"script" JavaScript Collections

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | JavaScript |all attributes | | Collections |behaviorUrns childNodes | | |children | +----------------+--------------------------------------------------------------+

     </source>
   
  


"script" JavaScript Methods

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | JavaScript |addBehavior appendChild | | Methods |applyElement attachEvent | | |clearAttributes cloneNode | | |componentFromPoint contains | | |detachEvent dragDrop | | |fireEvent getAdjacentText | | |getAttribute getAttributeNode | | |getElementsByTagName hasChildNodes | | |insertAdjacentElement insertBefore | | |mergeAttributes normalize | | |removeAttribute removeAttributeNode | | |removeBehavior removeChild | | |replaceAdjacentText replaceChild | | |setAttribute setAttributeNode | | |swapNode | +----------------+--------------------------------------------------------------+

     </source>
   
  


"script" JavaScript Properties

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | JavaScript |canHaveHTML charset | | Properties |className clientHeight | | |clientLeft clientTop | | |clientWidth defer | | |dir disabled | | |event firstChild | | |htmlFor id | | |innerHTML innerText | | |isContentEditable isDisabled | | |isMultiLine isTextEdit | | |lang language | | |lastChild nextSibling | | |nodeName nodeType | | |nodeValue offsetHeight | | |offsetLeft offsetParent | | |offsetTop offsetWidth | | |ownerDocument parentElement | | |parentNode parentTextEdit | | |previousSibling readyState | | |scopeName scrollHeight | | |scrollLeft scrollTop | | |scrollWidth sourceIndex | | |src tagName | | |tagUrn text | | |title type | | |uniqueID | +----------------+--------------------------------------------------------------+

     </source>
   
  


"script" Microsoft Behaviors

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | Microsoft |clientCaps download | | Behaviors |homePage saveSnapshot | +----------------+--------------------------------------------------------------+

     </source>
   
  


"script" Syntax and Note

   <source lang="html4strict">

Note: This element contains the scripts. It can stay in either the <head> or the <body> section.

Syntax:

<script attributes events> . . . </script>


     </source>