js如何让input的边框加粗

2024-10-12 03:17:34

1、新建一个html文件,命名为test.html,用于讲解js如何让input的边框加粗。

js如何让input的边框加粗

3、在test.html文件内,设置input标签的id属性为wone。

js如何让input的边框加粗

5、在js标签内,通过id获得input对象,再通过borderWidth属性设置边框的粗细,例如,这里设置input边框为5px宽。

js如何让input的边框加粗
猜你喜欢