Get Element from Object
I've got this
var fou = foubar.getContent();
where getContent
is
Returns a jQuery object wrapping the dialog's content region - everything inside the frame, excluding the title bar.
Thing is there are textbox values inside of fou I'd like to 开发者_JAVA技巧get at. I've tried this below, but it doesn't work.
fou.$('#textbox1').val();
How can I select elements of fou
?
Try this: $('#textbox1',fou).val();
If fou
really is a jQuery object, you can use find
[docs]:
var value = fou.find('#textbox1').val();
if the textbox is a child element of fou you can do:
$(fou.children('#textbox1')).val();
Use find as shown below:
fou.find( '#textbox1' );
精彩评论