简体   繁体   中英

Problem with HTML frameset and frame

I am using the below HTML file. The page displays nothing and my text editor is highlighting the frameset tags in yellow color showing it is an error (or warning). What is wrong with this code?

<html>
    <head></head>
    <body>
        <frameset>
            <frame src="http://google.com/" scrolling="yes">
        </frameset>
    </body>
</html>

Remove the <body> tag. Also the closing tag </body>

<html>
    <head></head>

        <frameset>
            <frame src="http://google.com/" scrolling="yes">
        </frameset>

</html>

我相信需要width属性:

<frameset cols="*">

Remove body and add a cols or rows attribute to the frameset. Also, reference the Frameset DTD, which will give you the rules for using frames.

<html>
    <head></head>
    <body>
        <iframe src="http://google.com/" scrolling="yes"/>
    </body>
</html>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM