HTML CSS Reference/CSS Attributes and Javascript Style Properties/hasLayout
Содержание
"hasLayout" Example
<html>
<body>
<div align="left"
id="myDiv1"
style="width:50%; background-color:aqua"
onMouseOver="alert("hasLayout property value: "+this.currentStyle.hasLayout)">
div segment
</div>
<br>
<div align="left"
id="myDiv2"
style="background-color:aqua"
onMouseOver="alert("hasLayout property value: "+this.currentStyle.hasLayout)">
div element has no layout or positioning set.
</div>
</body>
</html>
"hasLayout" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<a> <address> |
| |<b> <big> |
| |<blockquote> <body> |
| |<button> <caption> |
| |<center> <cite> |
| |<code> <col> |
| |<colgroup> currentStyle |
| |<custom> <dd> |
| |defaults <dfn> |
| |<dir> <div> |
| |<dl> <dt> |
| |<em> <fieldset> |
| |<form> <hn> |
| |<html> <i> |
| |<img> <input type="button"> |
| |<input type="checkbox"> <input type="file"> |
| |<inputtype="image"> <input type="password"> |
| |<input type="radio"> <input type="reset"> |
| |<input type="submit"> <input type="text"> |
| |<isindex> <kbd> |
| |<label> <legend> |
| |<li> <listing> |
| |<marquee> <menu> |
| |<ol> <p> |
| |<pre> runtimeStyle |
| |<s> <samp> |
| |<select> <small> |
| |<span> <strike> |
| |<strong> style |
| |<sub> <sup> |
| |<table> <tbody> |
| |<td> <textarea> |
| |<tfoot> <th> |
| |<thead> <tr> |
| |<tt> <u> |
| |<ul> <var> |
| |<xmp> |
+----------------+--------------------------------------------------------------+
"hasLayout" Possible Values
Possible Values
truefalse the default.
The following style properties can cause an element to have layout:
display (values: inline or block),height,
float (values: left or right),
position (value: absolute),width,writing-mode (value: tb-rl)zoom.
"hasLayout" Syntax and Note
Note:
Read-only JavaScript-only style property.
Whether the element has a layout.
Syntax:
elementID.currentStyle.hasLayout = "value"