JavaScript Reference/Event Handlers Reference/onSelectStart
Содержание
"onSelectStart" Example
<html>
<head>
<script language="JavaScript">
function function1() {
alert("The wbex.ru home page will open");
window.open("http://www.wbex.ru","","")
}
</script></head>
<body contenteditable=true>
<a href="http://www.wbex.ru"
onselectstart="function1()">wbex.ru
</a>
</body>
<html>
"onSelectStart" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<a> <acronym> |
| |<address> <area> |
| |<b> <bdo> |
| |<big> <blockquote> |
| |<body> <br> |
| |<button> <caption> |
| |<center> <cite> |
| |<code> <custom> |
| |<dd> <del> |
| |<dfn> <dir> |
| |<div> <dl> |
| |<dt> <em> |
| |<fieldset> <font> |
| |<form> <hn> |
| |<hr> <i> |
| |<img> <inputtype="button"> |
| |<input type="checkbox"> <input type="file"> |
| |<input type="image"> <input type="password"> |
| |<input type="radio"> <input type="reset"> |
| |<inputtype="submit"> <input type="text"> |
| |<kbd> <label> |
| |<li> <listing> |
| |<map> <marquee> |
| |<menu> <nobr> |
| |<object> <ol> |
| |<option> <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> <xmp> |
+----------------+--------------------------------------------------------------+
"onSelectStart" Properties
+----------------+--------------------------------------------------------------+
| Properties |altKey altLeft |
| |cancelBubble clientX |
| |clientY ctrlLeft |
| |offsetX offsetY |
| |returnValue screenX |
| |screenY shiftLeft |
| |srcElement type |
| |x y |
+----------------+--------------------------------------------------------------+
"onSelectStart" Syntax and Note
Note:
This event fires when an element or its contents are selected
Selected means highlighted by dragging the mouse.
To fire this event, <body>"s contenteditable attribute must be set to true.