摘要:        
用JS访问iframe中的元素1.首先,如何访问iframe中的元素?见如下代码:(1)1.htm源码:<input type=button value="test" onclick="self.frames['a'].document.all.mybutton.disabled=true"><iframe name='a' src="2.htm" id="iframe2"></iframe>(2)2.htm源码<input type=but    阅读全文
        posted @ 2013-05-14 14:11
elleniou
阅读(466)
评论(0)
推荐(0)
            
        
        
摘要:        
query取得iframe中元素的几种方法在iframe子页面获取父页面元素代码如下:$('#objId', parent.document);// 搞定...在父页面 获取iframe子页面的元素代码如下:$("#objid",document.frames('iframename').document)$(document.getElementById('iframeId').contentWindow.document.body).html()显示iframe中body元素的内容。$("#testId"    阅读全文
        posted @ 2013-05-14 14:10
elleniou
阅读(404)
评论(0)
推荐(0)
                    
                
浙公网安备 33010602011771号