I have a page where the input type always varies, and I need to get the values depending on the input type. So if the type is a radio, I need to get which is checked, and if
var val = $('input:checkbox:checked, input:radio:checked, \
select option:selected, textarea, input:text',
$('#container')).val();
Comments:
I assume, that there is exactly one form element, that can be either a textarea, input field, select form, a set of radio buttons or a single checkbox (you will have to update my code if you need more checkboxes).
The element in question lives inside an element with ID container (to remove ambiguences with other elements on the page).
The code will then return the value of the first matching element it finds. Since I use :checked and so on, this should always be exactly the value of what you're looking for.