//clear all controls
function clear() {
try {
$('input[type=text]').each(function () {
$(this).val('');
});
$('select').prop('selectedIndex', 0);
$('textarea').each(function () {
$(this).val('');
});
$('input[type=checkbox]').each(function () {
$(this).prop('checked', false);
});
} catch (e) {
alert(e.message);
}
}
function clear() {
try {
$('input[type=text]').each(function () {
$(this).val('');
});
$('select').prop('selectedIndex', 0);
$('textarea').each(function () {
$(this).val('');
});
$('input[type=checkbox]').each(function () {
$(this).prop('checked', false);
});
} catch (e) {
alert(e.message);
}
}
No comments:
Post a Comment