I would like to select a input field from a form on the fly, which mean, I don't know which form it would be. consider the following code: ( Suppose the input field id is always 'input1' across all forms)
$('[id^=myform]').submit(function(){
var formId = $(this).attr('id');
var result = $('#' + formId + ' input#inputl').val();
...
});
I am looking for a better solution for my purpose. Is there any?
idhas to be unique in a document, just#input1would do the trick.