2016-05-21 6 views

Antwort

0

Wenn Sie jQuery verwenden könnten Sie so etwas tun:

(function($) { 

// After check for form submission 
$('form :input').each(function(i) { 
    if($(this).val() == '') { 
     // Just remove the closest() method if you want to give the 
     // actual input a border 
     $(this).closest('.parent-div').css({ 'border': '1px solid #c20000' }); 
    } 
}); 

})(jQuery); 
Verwandte Themen