jQuery选择 type="password" 的 input 元素

时间:2026-02-16 11:48:56

1、新建html文件

jQuery选择 type=

2、创建form表单

jQuery选择 type=

3、预览效果如图

jQuery选择 type=

4、引入jquery.js

jQuery选择 type=

5、$(":password").css("background-color","#ccc");选取type="password" 的 input 元素并设置背景颜色

jQuery选择 type=

6、预览效果如图

jQuery选择 type=

© 2026 途途旅游
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com