英 [?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 ? ?預(yù)設(shè)。定義中等的下邊框。? ? thick ? ?定義粗的下邊框。? ? length ? ?可讓您自訂下邊框的寬度。? ??
#javascript borderWidth屬性 範(fàn)例
<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>
執(zhí)行實(shí)例 ?
點(diǎn)擊 "執(zhí)行實(shí)例" 按鈕查看線上實(shí)例