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

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -