几个input必须都填写否则button灰化
来源:互联网 发布:江苏网络推广公司排名 编辑:程序博客网 时间:2024/06/05 08:25
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title></title> <link rel="stylesheet" href="bootstrap.min.css"> <style type="text/css"> body{ padding: 30px; } a:hover,.btn1{ font-size:1.2rem; border-radius:2px; height:2rem; line-height:2rem; color:#999; border-bottom:.3rem solid #bbb; text-align:center; display:block; background:#f5f5f5; text-decoration: none; width: 100px; } </style></head><body><input id="new_input_1" type="tel" maxlength="1" class="inp1"><br><input id="new_input_2" type="tel" maxlength="1" class="inp1"><br><input id="new_input_3" type="tel" maxlength="1" class="inp1"><br><input id="new_input_4" type="tel" maxlength="1" class="inp1"><br><input id="new_input_5" type="tel" maxlength="1" class="inp1"><br><input id="new_input_6" type="tel" maxlength="1" class="inp1"><br><a id="sub" class="btn1" >提交</a> <script type="text/javascript" src="jquery-2.1.4.min.js"></script> <script type="text/javascript" src="bootstrap.min.js"></script><script> var a=$("#new_input_1"); var b=$("#new_input_2"); var c=$("#new_input_3"); var d=$("#new_input_4"); var e=$("#new_input_5"); var f=$("#new_input_6"); $("input").on("keyup",function(){ var mb=a.val().trim().length && b.val().trim().length && c.val().trim().length && d.val().trim().length && e.val().trim().length && f.val().trim().length; if(mb){ // alert(aa);// alert($(this).val()); $("#sub").css({ "background":"#e34f49", "color":"#fff", "border-bottom":".3rem solid #cd322c" }); }else{ $("#sub").css({ "background":"#f5f5f5", "color":"#999", "border-bottom":".3rem solid #bbb" }); } });</script></body></html>
0 0
- 几个input必须都填写否则button灰化
- input 不可填写
- 只能填写数字的input
- 禁用(灰化) Button 后提交的问题
- 禁用(灰化) Button 后提交的问题
- 让Sumbit Button 支持 禁用(灰化)提交
- 迷失button 和 input button
- button & input type="button"
- android-Button,ImageButton的文本内容填写
- 设置SVN提交代码必须填写注释
- Android - Hierarchical Parent 必须填写的解决办法
- input 填写整数,Float类型限制
- css style (input button)
- BUTTON和INPUT
- BUTTON和INPUT
- input /button链接方法
- input button 变手型
- input button 变手型
- JMeter教程
- 【UI视觉】Android material Ripple 水波 点击效果
- 单例模式
- linux c mysql 开发
- http状态码详解
- 几个input必须都填写否则button灰化
- android 调用系统出现activity销毁
- Groovy插件安装
- vs2013调试时总是要加载公共符号
- C++/CLI托管
- IBM HTTP Server https configuration
- HDOJ 题目3308 LCIS(线段树,区间查询,区间合并)
- ScrollView自动从顶部显示
- SAS硬盘与SATA硬盘有什么区别