jquery 給iframe裏的元素添加事件

$("#iframeId").on("load", function(event){//判斷 iframe是否加載完成  這一步很重要
  $("#divId",this.contentDocument).click(function(){//添加點擊事件
    alert("就是這樣");
  });
});
相關文章
相關標籤/搜索