JavaScript DHTML/Style Layout/Margin
Версия от 10:02, 26 мая 2010; (обсуждение)
Содержание
"bottomMargin" Example
<html>
<body id="myBody">
<button onclick="alert(document.body.bottomMargin);">Bottom Margin</button></body>
<button onclick="alert(document.body.topMargin);">Top Margin</button></body>
<button onclick="alert(document.body.leftMargin);">Left Margin</button></body>
<button onclick="alert(document.body.rightMargin);">Right Margin</button>
</body>
</html>
"leftMargin" Example
<html>
<body id="myBody">
<button onclick="alert(document.body.bottomMargin);">Bottom Margin</button></body>
<button onclick="alert(document.body.topMargin);">Top Margin</button></body>
<button onclick="alert(document.body.leftMargin);">Left Margin</button></body>
<button onclick="alert(document.body.rightMargin);">Right Margin</button>
</body>
</html>
"rightMargin" Example
<html>
<body id="myBody">
<button onclick="alert(document.body.bottomMargin);">Bottom Margin</button></body>
<button onclick="alert(document.body.topMargin);">Top Margin</button></body>
<button onclick="alert(document.body.leftMargin);">Left Margin</button></body>
<button onclick="alert(document.body.rightMargin);">Right Margin</button>
</body>
</html>
"topMargin" Example
<html>
<body id="myBody">
<button onclick="alert(document.body.bottomMargin);">Bottom Margin</button></body>
<button onclick="alert(document.body.topMargin);">Top Margin</button></body>
<button onclick="alert(document.body.leftMargin);">Left Margin</button></body>
<button onclick="alert(document.body.rightMargin);">Right Margin</button>
</body>
</html>