how can i clear all inputs with type=text and type=select(set selected index to 0)?
I thought this must be easy with jQuery, i don’t want to postback to the server for this.
This is what i have:
function clearValues(containerControlID) {
$('#' + containerControlID + ' :input').each(function (index) {
$(this).val("");
});
}
But i find all inputs(images,checkboxes etc). I only want to clear textareas, text-inputs and selects.
So how can i find these inputs with jQuery and clear their values or set the selected index of selects to 0?
Thank you in advance.
Try this