JavaScript Reference/Event Handlers Reference/onControlSelect
Версия от 18:30, 25 мая 2010; (обсуждение)
Содержание
"onControlSelect" Example
<html>
<body>
<div contenteditable=true>
You can edit the following controls.
<input type=text
value="This is a text box"
oncontrolselect="alert("oncontrolselect for the text box fires!")">
<button oncontrolselect="alert("oncontrolselect for the button fires!")">
This is a button
</button>
</div>
</body>
</html>
"onControlSelect" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<a> <acronym> |
| |<address> <applet> |
| |<area> <b> |
| |<bdo> <big> |
| |<blockquote> <body> |
| |<button> <caption> |
| |<center> <cite> |
| |<custom> <dd> |
| |<dfn> <dir> |
| |<div> <dl> |
| |document <dt> |
| |<em> <embed> |
| |<fieldset> <font> |
| |<form> <frame> |
| |<frameset> <hn> |
| |<hr> <i> |
| |<iframe> <img> |
| |<input type="button"> <inputtype="checkbox"> |
| |<input type="file"> <input type="hidden"> |
| |<input type="image"> <input type="password"> |
| |<input type="radio"> <input type="reset"> |
| |<inputtype="submit"> <input type="text"> |
| |<ins> <isindex> |
| |<kbd> <label> |
| |<legend> <li> |
| |<listing> <marquee> |
| |<menu> <object> |
| |<ol> <p> |
| |<pre> <q> |
| |<rt> <ruby> |
| |<s> <samp> |
| |<select> <small> |
| |<span> <strike> |
| |<strong> <sub> |
| |<sup> <table> |
| |<tbody> <td> |
| |<textarea> <tfoot> |
| |<th> <thead> |
| |<tr> <tt> |
| |<u> <ul> |
| |<var> window |
| |<xmp> |
+----------------+--------------------------------------------------------------+
"onControlSelect" Properties
+----------------+--------------------------------------------------------------+
| Properties |altKey altLeft |
| |ctrlLeft offsetX |
| |offsetY returnValue |
| |screenX screenY |
| |shiftLeft srcElement |
| |type x |
| |y |
+----------------+--------------------------------------------------------------+
"onControlSelect" Syntax and Note
Note:
This event fires when the user selects the element.
The contenteditable attribute value must be true in the <container> element.