jquery 给iframe里的元素添加事件

it2022-05-06  3

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

转载于:https://www.cnblogs.com/Strom-HYL/p/7090937.html


最新回复(0)