搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
JavaScript
jQuery 教程
jQuery 参考手册
源代码
清空
点击运行
<!DOCTYPE html> <html> <title>jQuery :text选择器示例 - 基础教程(div.cn)</title> <head> <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(":text").css("background", "lime"); }); </script> </head> <body> <form action=""> 姓名:<input type="text" name="user"> <br> 密码:<input type="password" name="password"> <br> <button type="button">button按钮</button> <input type="button" value ="input按钮"> <br> <input type="reset" value ="重置"> <input type="submit" value="提交"> <br> </form> </body> </html>
运行结果