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

2025-10-04 00:08:17

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=

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢