Latest web development tutorials

HTML DOM 이미지 테두리 속성

이미지 객체 참조 이미지 개체

정의 및 사용

테두리 속성 집합 또는 사진 테두리 속성 값을 반환합니다.

국경 속성은 이미지의 테두리의 폭을 지정합니다.

참고 : (이미지 자체가 국경 제공하지 않는 한) 기본 이미지는 테두리가 없습니다함으로써.

문법

imageObject.border=pixels


브라우저 지원

Internet ExplorerFirefoxOperaGoogle ChromeSafari

모든 주요 브라우저는 테두리 속성을 지원


그림 프레임을 추가 :

<html>
<head>
<script>
function addBorder()
{
document.getElementById("compman").border="2";
}
</script>
</head>
<body>

<img id="compman" src="compman.gif" alt="Computerman">
<br><br>
<input type="button" onclick="addBorder()" value="Add border">

</body>
</html>

»시도


이미지 객체 참조 이미지 개체