javascript - How can I clear form except some input text? -
i try :
$('.modal').on('show.bs.modal', function (e) { ... modal.find('.modal-content form#form-one').not('#datepicker, #timepicker').clearform(); });
i had use not
on input text has id datepicker , id timepicker
but, if script executed, both input text cleared
how can solve problem?
you may apply particular css class let's dontclear
on input fields wish keep.
you can exclude inputs dontclear
class follows :
modal.find('.modal-content form#form-one').not('input[class=dontclear]').clearform();
hope helps !
Comments
Post a Comment