JavaScript Reference/Javascript Properties/clientLeft — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 2010
"clientLeft" Example
<html>
<body>
<div id="myDiv"
style="position:absolute;
left:150;
top:100;
width:400;
height:200;
background-color:blue;">
</div>
<button onclick="alert(myDiv.clientLeft);">clientLeft</button>
<br>
<br>
</body>
</html>
"clientLeft" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<a> <address> |
| |<applet> <b> |
| |<bdo> <big> |
| |<blockquote> <body> |
| |<button> <caption> |
| |<center> <cite> |
| |<code> <col> |
| |<colgroup> <custom> |
| |<dd> <dfn> |
| |<dir> <div> |
| |<dl> <dt> |
| |<em> <embed> |
| |<fieldset> <form> |
| |<hn> <html> |
| |<i> <img> |
| |<input type="button"> <input type="checkbox"> |
| |<input type="file"> <input type="image"> |
| |<input type="password"> <input type="radio"> |
| |<input type="reset"> <input type="submit"> |
| |<input type="text"> <isindex> |
| |<kbd> <label> |
| |<legend> <li> |
| |<listing> <marquee> |
| |<menu> <meta> |
| |<nobr> <object> |
| |<ol> <option> |
| |<p> <plaintext> |
| |<pre> <s> |
| |<samp> <script> |
| |<select> <small> |
| |<span> <strike> |
| |<strong> <sub> |
| |<sup> <table> |
| |<tbody> <td> |
| |<textarea> <tfoot> |
| |<th> <thead> |
| |<tr> <tt> |
| |<u> <ul> |
| |<var> <xmp> |
+----------------+--------------------------------------------------------------+
"clientLeft" Syntax and Note
Note:
Read-only properties.
Get the left side of a positioned element
Syntax:
document.all.elementID.clientLeft
document.all.elementID.clientTop