英 [?b?:d? widθ]? ?美 [?b?rd? w?dθ]??
n.邊框?qū)挾?/p>
javascript borderWidth屬性 語法
作用:設(shè)置所有四個邊框的寬度。
語法:Object.style.borderWidth=thin|medium|thick|length
參數(shù):thin ? ?定義細的下邊框。? ? medium ? ?默認。定義中等的下邊框。? ? thick ? ?定義粗的下邊框。? ? length ? ?允許您自定義下邊框的寬度。? ??
javascript borderWidth屬性 示例
<html> <head> <style type="text/css"> p { border: thin solid #FF0000 } </style> <script type="text/javascript"> function changeBorderWidth() { document.getElementById("p1").style.borderWidth="thick thin"; } </script> </head> <body> <input type="button" onclick="changeBorderWidth()" value="Change border widths" /> <p id="p1">This is a paragraph</p> </body> </html>
運行實例 ?
點擊 "運行實例" 按鈕查看在線實例