小白教程
所有教程
关于
Search
172.70.100.99
172.70.100.99
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Sel input button”的源代码
本页内容
上一节:
Sel_input_reset
下一节:
Sel_input_image
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE::button}}[[Category:jquery ref selectors|56]] = jQuery :button 选择器 = [[jquery ref selectors|jQuery 选择器]] 选取带有 type="button" 的 <button> 和 <input> 元素: <sample title="" desc="" lang="html" hererun="1"> $(":button") </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $(":button").css("background-color","red"); }); </script> </head> <body> <form action=""> 用户名: <input type="text" name="user"><br> 密码: <input type="password" name="password"><br> <button type="button">没用的按钮</button> <input type="button" value="另外一个没用的按钮"><br> <input type="reset" value="重置"> <input type="submit" value="提交"><br> </form> </body> </html> </run> == 定义和用法 == :button 选择器选取带有 type=button 的 button 和 input 元素。 '''提示:'''通过该选择器使用 input:button 不会选取 button 元素。 [[jquery ref selectors|jQuery 选择器]]
返回至“
Sel input button
”。
上一节:
Sel_input_reset
下一节:
Sel_input_image