iframe页面事件,递归获取所有iframe

 

function setMenuClick(){
		$(window).bind('click', function(e) {
			var e = e || window.event; //浏览器兼容性 
			var elem = e.target || e.srcElement;
			while (elem) {
				if (elem.id && (elem.id == 'nav_menu')) {
					return;
				}
				elem = elem.parentNode;
			}
			$(".nav_menu ul li").each(function(){
				$(this).attr("class","");
			});
		});
		
		var iframeList = [];
		var recursionIframe = function(doc){
			var iframeTemp = doc.getElementsByTagName("iframe");
			debugger;
			if(iframeTemp && iframeTemp.length>0){
				for(var k=0; k

 

你可能感兴趣的:(javaScript,iframe)