JavaScript DHTML/Style Layout/Margin
Содержание
"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>