Javascript 如何验证所有文本框?
这是为在线测试填空。所以我必须填写所有的文本框Javascript 如何验证所有文本框?,javascript,jquery,jquery-validate,Javascript,Jquery,Jquery Validate,这是为在线测试填空。所以我必须填写所有的文本框 <form action="" method="post" id="question_form" class="cmxform" enctype="multipart/form-data"> <input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24" id="4" required="true"
<form action="" method="post" id="question_form" class="cmxform" enctype="multipart/form-data">
<input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24" id="4" required="true" >
<input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24" id="5" required="true" >
<input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24" id="6" required="true" >
名称必须具有唯一值,请将
名称
用作数组,然后重试此操作
<form action="" method="post" id="question_form" class="cmxform" enctype="multipart/form-data">
<input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24[0]" id="4" required="true" >
<input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24[1]" id="5" required="true" >
<input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24[2]" id="6" required="true" >
@Tushar:是的,没错。。但这是一个集体问题…所以我需要和这个问题同名。任何其他验证方法?如果HTML中有required
属性,则无需在rules
对象中声明required
规则,则查找更新的小提琴。但是,无论规则是如何分配的,您必须在每个输入元素上具有唯一的名称
,否则此插件将无法正常工作。这项任务没有解决办法;这就是插件跟踪一切的方式。