各位js高手,大家好,我们项目有一个需求是向frameset主页面中插入一个层,主页面代码如下:
default.htm<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>主页面</title>
</head>
<frameset cols="*" rows="40,*" frameborder="0" framespacing="0" id="frmMain" name="frmMain" border="0">
<frame frameborder="0" noresize scrolling="no" id="frmTop" name="frmTop" src="top.htm">
<frame id="frmBody" name="frmBody" frameborder="0" noresize scrolling="no" src="DefaultContent.htm">
</frameset>
</html>我从top.htm中向default.htm插入层后,在ie下可以正常显示,但是在firefox下无法正常显示,请问如何解决呢?
ie下截图如下:http://hi.csdn.net/attachment/201009/10/41214_1284106871yqfL.png
ff下截图如下:http://hi.csdn.net/attachment/201009/10/41214_1284106871T545.png
从图中可以看出,在ff中其实已经将层加入到frameset中了,但不显示出来,请高手指点一下,多谢!
有路过的也请顶一下,多谢!
default.htm<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>主页面</title>
</head>
<frameset cols="*" rows="40,*" frameborder="0" framespacing="0" id="frmMain" name="frmMain" border="0">
<frame frameborder="0" noresize scrolling="no" id="frmTop" name="frmTop" src="top.htm">
<frame id="frmBody" name="frmBody" frameborder="0" noresize scrolling="no" src="DefaultContent.htm">
</frameset>
</html>我从top.htm中向default.htm插入层后,在ie下可以正常显示,但是在firefox下无法正常显示,请问如何解决呢?
ie下截图如下:http://hi.csdn.net/attachment/201009/10/41214_1284106871yqfL.png
ff下截图如下:http://hi.csdn.net/attachment/201009/10/41214_1284106871T545.png
从图中可以看出,在ff中其实已经将层加入到frameset中了,但不显示出来,请高手指点一下,多谢!
有路过的也请顶一下,多谢!
1、因为default是frameset页面,所以不能直接在default中加入节点,只能在default子页加载完成后往default中动态创建节点;
2、因为defaultContent页面是不固定的,而且在我们的项目中它也是一个frameset页面,而且比default更复杂,所以才考虑到加在default中,如果defaultContent是一个普通页面,也就没有这种问题。
你的有个地方不对
就像table,table中可以放如其他的标签,但是不能显示
table tr td 你在tr中或td外面,tr外面放其他标签是不会显示的
frameset里面只能放frame,所以你的div要放在frame的src的文件html中
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><frameset rows="80,*" cols="*" frameborder="no" border="0" framespacing="0">
<frame src="file:///C|/Program Files/Adobe/Adobe Dreamweaver CS3/UntitledFrame-2" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" />
<frameset cols="*,80" frameborder="no" border="0" framespacing="0">
<frame src="file:///C|/Program Files/Adobe/Adobe Dreamweaver CS3/Untitled-1" name="mainFrame" id="mainFrame" />
<frame src="file:///C|/Program Files/Adobe/Adobe Dreamweaver CS3/UntitledFrame-3" name="rightFrame" scrolling="No" noresize="noresize" id="rightFrame" />
</frameset>
</frameset>
<noframes><body>
</body>
</noframes></html>