HTML DOM hspace ÊôÐÔ
¶¨ÒåºÍÓ÷¨
hspace ÊôÐÔ¿ÉÉèÖûò·µ»ØÍ¼ÏñµÄ×ó±ßÔµºÍÓÒ±ßÔµµÄ¿Õ°×¡£
hspace ºÍ vspace ÊôÐÔ¿ÉÓë align һͬʹÓã¬À´ÉèÖÃͼÏñÓëÖÜΧÎı¾µÄ¾àÀë¡£
Óï·¨
imageObject.hspace=pixels
ʵÀý
ÏÂÃæµÄÀý×Ó½«ÉèÖÃͼÏñµÄ hspace ºÍ vspace ÊôÐÔ£º
<html>
<head>
<script type="text/javascript">
function setSpace()
{
document.getElementById("compman").hspace="50"
document.getElementById("compman").vspace="50"
}
</script>
</head>
<body>
<img id="compman" src="compman.gif" alt="Computerman" align="right" />
<p>Some text. Some text. Some text. Some text.</p>
<input type="button" onclick="setSpace()"
value="Set hspace and vspace">
</body>
</html>