⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jsref_events.asp@output=print

📁 W3Schools tutorial..web designing
💻 ASP@OUTPUT=PRINT
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JavaScript Event Reference</title>
 
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />

<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

</head>

<body>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>


<h1>JavaScript Event Reference</h1>
<hr />
<p class="intro">Events are normally used in combination with functions, and the function will 
not be executed before the event occurs!</p>
<hr />

<h2>Event Handlers</h2>
<p>New to HTML 4.0 was the ability to let HTML events trigger actions in the 
browser, like starting a JavaScript when a user clicks on an HTML element. Below 
is a list of the attributes that can be inserted into HTML tags to define event 
actions.</p>

<p><b>FF</b>: Firefox, <b>N</b>: Netscape, <b>IE</b>: Internet Explorer</p>
<table class="ex" cellspacing="0" border="1" width="100%" id="table10">
  <tr>
    <th width="20%" align="left" valign="top">Attribute</th>
    <th width="68%" align="left" valign="top">The event occurs when...</th>
    <th width="4%" align="left" valign="top">FF</th>
    <th width="4%" align="left" valign="top">N</th>
    <th width="4%" align="left" valign="top">IE</th>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onabort.asp">onabort</a></td>
	<td valign="top">Loading of an image is interrupted</td>
    <td valign="top">1</td>
    <td valign="top">3</td>
    <td valign="top">4</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onblur.asp">onblur</a></td>
	<td valign="top">An element loses focus</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onchange.asp">onchange</a></td>
	<td valign="top">The user changes the content of a field</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onclick.asp">onclick</a></td>
	<td valign="top">Mouse clicks an object</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_ondblclick.asp">ondblclick</a></td>
	<td valign="top">Mouse double-clicks an object</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onerror.asp">onerror</a></td>
	<td valign="top">An error occurs when loading a document or an image</td>
    <td valign="top">1</td>
    <td valign="top">3</td>
    <td valign="top">4</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onfocus.asp">onfocus</a></td>
	<td valign="top">An element gets focus</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onkeydown.asp">onkeydown</a></td>
	<td valign="top">A keyboard key is pressed</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onkeypress.asp">onkeypress</a></td>
	<td valign="top">A keyboard key is pressed or held down</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onkeyup.asp">onkeyup</a></td>
	<td valign="top">A keyboard key is released</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onload.asp">onload</a></td>
	<td valign="top">A page or an image is finished loading</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onmousedown.asp">onmousedown</a></td>
	<td valign="top">A mouse button is pressed</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>

  <tr>
	<td valign="top"><a href="jsref_onmousemove.asp">onmousemove</a></td>
	<td valign="top">The mouse is moved</td>
    <td valign="top">1</td>
    <td valign="top">6</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onmouseout.asp">onmouseout</a></td>
	<td valign="top">The mouse is moved off an element</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onmouseover.asp">onmouseover</a></td>
	<td valign="top">The mouse is moved over an element</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onmouseup.asp">onmouseup</a></td>
	<td valign="top">A mouse button is released</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onreset.asp">onreset</a></td>
	<td valign="top">The reset button is clicked</td>
    <td valign="top">1</td>
    <td valign="top">3</td>
    <td valign="top">4</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onresize.asp">onresize</a></td>
	<td valign="top">A window or frame is resized</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onselect.asp">onselect</a></td>
	<td valign="top">Text is selected</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onsubmit.asp">onsubmit</a></td>
	<td valign="top">The submit button is clicked</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>

  <tr>
	<td valign="top"><a target="_top" href="jsref_onunload.asp">onunload</a></td>
	<td valign="top">The user exits the page</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
</table>
<br />

<hr />

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -