yoomin

在父窗口设置子元素iframe的宽度:

function SetIframeHeight() {
	var task = document.getElementById(\'task\');
	var error = document.getElementById(\'error\');
	var synopsis = document.getElementById(\'synopsis\');
	try{
		task.height = task.contentWindow.document.body.clientHeight;
		error.height = error.contentWindow.document.body.clientHeight;
		synopsis.height = synopsis.contentWindow.document.body.clientHeight;
	}catch (ex){}
}			   			   

获取iframe的子元素

document.getElementById(\'frameId\').contentDocument.getElementById(\'treeDemo\')

分类:

技术点:

相关文章:

  • 2021-10-31
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2021-11-04
猜你喜欢
  • 2021-12-12
  • 2021-12-12
  • 2022-02-07
  • 2022-02-07
  • 2022-12-23
相关资源
相似解决方案