英 [?b?:d? widθ]? ?美 [?b?rd? w?dθ]??

n.邊框?qū)挾?/p>

javascript borderWidth屬性 語法

作用:設(shè)置所有四個(gè)邊框的寬度。

語法:Object.style.borderWidth=thin|medium|thick|length

參數(shù):thin ? ?定義細(xì)的下邊框。? ? medium ? ?默認(rèn)。定義中等的下邊框。? ? 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>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例