简体   繁体   中英

How reset Form with button type reset work with field is loaded by javascript

I want to implement a reset button to reset form.

When click button reset, it will reset all data to data saved in database.

It works perfectly for almost all fields, but I have some fields which are loading data by JavaScript (data is filled by js).

And this point reset button reset all this fields to empty

Is there a way to fix it in this situation?

尝试这个

$(':input','#myForm').not('.ignoreFieldClassName');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM