开发者

How to make an HTML frame unmovable?

开发者 https://www.devze.com 2023-01-18 06:43 出处:网络
How can I modify this frames so that users can not move those frames? <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\"

How can I modify this frames so that users can not move those frames?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title></title>
</head>
    <frameset border="1" rows="100, 200"  >
      <frame src="page1.html">
      <f开发者_StackOverflowrameset border="1" cols="20%, 80%" >
        <frame  src="page2.html">
        <frame src="page3.html">
      </frameset>      
  </frameset>
</html>


You can use the noresize attribute to disable it:

<frameset border="1" rows="100, 200"  >
  <frame src="page1.html" noresize>
  <frameset border="1" cols="20%, 80%" >
    <frame  src="page2.html" noresize>
    <frame src="page3.html" noresize>
  </frameset>      
</frameset>


I second what Nick said, but would just like to add that I think it should be one of the following:

noresize="true"
noresize="noresize"

I am not sure which one it is, but I know the attribute "nowrap" uses "nowrap" for the value too, instead of true. Can someone please confirm which of the above options applies here?

Also do you have to use frames? I notice you are loading pages in each one. If you create them as divs, you can use most server side languages to load pages into the divs. For example:

  • In ASP.Net you are able to do this - but unfortunately I do not have the code for this available right now. There is a way to process a page within a page.
  • In PHP you can use the include command (include "page1.htm";). PHP is much simpler in my opinion.
0

精彩评论

暂无评论...
验证码 换一张
取 消