<form>
    <table>
          <thead>
              <tr>
	             <th>a</th>
	             <th>b</th>
	             <th>c</th>
	             <th>d</th>
	             <th>e</th>
               </tr>
          </thead>
          <tbody>
               <tr class=‘row‘>
                    <td><input type=‘text‘ name=‘1‘ id=‘1‘ ></td>
                    <td><select name=‘o1‘ id=‘o1‘><option></option></select></td>
	            <td><input type=‘text‘ name=‘2‘ id=‘2‘ ></td>
	            <td><input type=‘text‘ name=‘3‘ id=‘3‘ ></td>
                    <td><select name=‘o12‘ id=‘o12‘><option></option></select></td>
               </tr>
          </tbody>
    </table>
</form>        
利用filter过滤选择器对元素集合进行遍历,index表示索引号,obj表示对象,obj.value表示的是获取的值。通过判断获取的值是否为空来给对象的样式进行修改:
$(‘.row‘).find(‘input‘,‘select‘).filter(‘[name$=opc_width],[name$=opc_space],[name$=bias]‘).each(function(index,obj){
         if(obj.value == ‘‘ || obj.value == null || obj.value == "undefined"){
                  $(obj).css(‘border-color‘,‘red‘);
         }else{
                  $(obj).css(‘border-color‘,‘‘);
        }
                });