JavaScript Reference/Javascript Properties/border

Материал из Web эксперт
Перейти к: навигация, поиск

"border" Example

    
<html>
<body>
<img id="myImage" src="yourimage.gif">
<button onclick="myImage.border = 15;">Add a border</button>
<button onclick="myImage.border = 0;">Remove border</button>
</body>
</html>



"border" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<frameset>                      <iframe>                      |
|                |<img>                           <object>                      |
|                |<table>                         <td>                          |
+----------------+--------------------------------------------------------------+



"border" Syntax and Note

Note:
Read and write property. 
Sets the element"s border width.
    
Syntax:
    
document.getElementById("elementID").border = value
document.all.elementID.border = value // IE only