jquery 给iframe里的元素添加事件

$("#iframeId").on("load", function(event){//判断 iframe是否加载完成  这一步很重要
  $("#divId",this.contentDocument).click(function(){//添加点击事件
    alert("就是这样");
  });
});
相关文章
相关标签/搜索