[英]How do I check a checkbox in the parent frame from within an iframe's $(document).ready?
我試過了:
$(document).ready(function(){
$(parent.top).find('.IAgreeCheckBox:first').prop("checked", true);
});
無濟於事。
$('.IAgreeCheckBox:first', window.parent.document).prop('checked', true);
如果上下文方法不起作用,請嘗試以下操作:
parent.$("#wOnlineApplication_cbxIAgree").prop("checked", true);
這就是我在iframe頁面中時引用父元素的方式。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.