开发者

Get Element from Object

开发者 https://www.devze.com 2023-02-15 09:21 出处:网络
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.

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' );
0

精彩评论

暂无评论...
验证码 换一张
取 消