javascript - hide() jQuery does it reset the value -
i have question when using jquery .hide() function hide input id, reset field/select value [0] or val('') or empty etc? reason ask because if user shows field, populates it, realises he/she made wrong decision on input has show/hide condition. when go hide field again, value still exist right?
what ideal way prevent unnecessary values coming through on .hide() inputs?
note: have hidden inputs pass value backend process's these form types hidden always.
the hide() function hide element (by toggling display style).
if want prevent value sent, disable input.
$('input').prop('disabled', true).hide(); or reactivate it
$('input').prop('disabled', false).show();
Comments
Post a Comment