JavaScript DHTML/Style Layout/Bounds — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 07:28, 26 мая 2010
Содержание
"boundingHeight" Example
<html>
<body>
<textarea id="myText" cols="70" rows="2" onclick="function1(this);">
Sample text for the document
</textarea>
<button onclick="function1()">Bounding Height</button>
<script language="JavaScript">
function function1() {
var m = myText.createTextRange();
alert(m.boundingHeight);
}
</script>
</body>
</html>
"boundingLeft" Example
<html>
<body>
<textarea id="myText" cols="70" rows="2" onclick="function1(this);">
Sample text for the document</textarea>
<button onclick="function3()">Bounding Left</button>
<script language="JavaScript">
function function3() {
var m = myText.createTextRange();
alert(m.boundingLeft);
}
</script>
</body>
</html>
"boundingTop" Example
<html>
<body>
<textarea id="myText" cols="70" rows="2" onclick="function1(this);">
Sample text for the document</textarea>
<button onclick="function4()">Bounding Top</button>
<script language="JavaScript">
function function4() {
var m = myText.createTextRange();
alert(m.boundingTop);
}
</script>
</body>
</html>
"boundingWidth" Example
<html>
<body>
<textarea id="myText" cols="70" rows="2" onclick="function1(this);">
Sample text for the document</textarea>
<button onclick="function2()">Bounding Width</button>
<script language="JavaScript">
function function2() {
var m = myText.createTextRange();
alert(m.boundingWidth);
}
</script>
</body>
</html>