开发者

jQuery .contentWindow.document.getElementById('email_box').value help

Hey all, i'm just wondering if there was any way to condense this line of code to pure jQuery without having the need to have ".contentWindow.document.getElementById('email_box').value" in there?

 $('#OIPHPFrame')[0].contentWindow.document.getElementById('email_box').value = $("#txtEmail").val();

and also the "click" event:

 $('#OIPHPFrame')[0].contentWindow.document开发者_运维问答.getElementById('butImport').click();

Any help would be awesome! :o)

SOLVED! :o)

 $('#OIPHPFrame').contents().find('#password_box').val($("#Password").val());
 $('#OIPHPFrame').contents().find('#butImport').click();

David


I think...

$('#OIPHPFrame')[0].find('#email_box').val();
$('#OIPHPFrame')[0].find('#butImport').click();

...should work.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜