你的意思是想根据mainFrame里面的实际内容动态的更改它的高是吗?
那你可以在mainaspx初始化写上这样一句
function screeChange(){
windowparentdocumentgetElementById('rightFrame')rows="50,"+documentbodyscrollHeight+",100";
}
</script>
body里面加上:onload="screeChange()"
注意一定要在body里面或者它的后面初始化,不然获取不到内容高度。
其中documentbodyscrollHeight获取mainaspx页面的实际文本高度,然后赋值给它的父窗体中的rightFrame的row值。。。
另外:<frame src="bottomhtm" id="bottomFrame" name="mainFrame" frameborder="0" scrolling="no" >
这个name值是不是写错鸟。。。。
另外在aspnet编程中。。。建议舍弃frameset 使用irame哈。。
用正则吧,相对容易一些,比如:
Dim ss, re, rv, Matchesss = "<embed src=""/manage/editor/attached/media/20130607/20130607151919941994flv"" type=""application/x-shockwave-flash"" width=""550"" height=""400"" autostart=""false"" loop=""true""/>"
Set re = New RegExp
reGlobal = True
reIgnoreCase = True
reMultiLine = True
rePattern = "\bsrc\s=\s([""'])([^""']+)\1"
Set Matches = reExecute(ss)
responsewrite Matches(0)SubMatches(1) & " \ "
rePattern = "\bwidth\s=\s([""'])([^""']+)\1"
Set Matches = reExecute(ss)
responsewrite Matches(0)SubMatches(1) & " \ "
rePattern = "\bheight\s=\s([""'])([^""']+)\1"
Set Matches = reExecute(ss)
responsewrite Matches(0)SubMatches(1)
当然我不知道你是不是受到了什么影响。 asp aspx其实都是一样。它是后端语言 但是浏览器只认识 html 语言。所以其实 你反过来想 它就是html页面。而且是标准的。
所以你应该查 js 如何获取 页面的高度跟宽度。
以上就是关于如何获取Frameset内frame文档高度全部的内容,包括:如何获取Frameset内frame文档高度、Asp 中 获取视频标签的src的值 width height 的值、asp网站开发中,c#怎样获取aspx页面的宽度,我想调屏幕自适应,不知道要判断什么参数等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)