用JS怎么获取frame 的 treeFrame的src,并重新赋值

<frameset rows="25,*" frameborder="NO" border="0" framespacing="0" id="topset">
<frame name="topFrame" src="Top.aspx" scrolling="NO" noresize>
<frameset rows="*" cols="160,9,*" framespacing="0" border="0" frameborder="NO" id="middleset" >
<frame name="treeFrame" id="1" src="DepartTree.aspx?TreeUrl=HOrgnizationTreeChart&">
<frame name="spliterFrame" src="../../../spliter.aspx" scrolling="NO" noresize>
<frame name="projectMain" src="HOrgnizationTreeChart.aspx?" />
</frameset>
</frameset>

JQ方法:$('#1').attr('src','url');
JS原生方法:document.getElementById("1").setAttribute('src','url');
温馨提示:答案为网友推荐,仅供参考
第1个回答  2014-09-01
document.getElementById("1").attr("src","value")
相似回答