使用iframe内嵌一个新闻框
属性 |
值 |
描述 |
frameborder |
0,1 |
规定是否显示框架周围的边框 |
name |
frame_name |
规定iframe的名称 |
scrolling |
yes, no, auto |
规定是否在iframe中显示滚动条(分别是始终显示、始终不显示、当内容超过边界时显示) |
scr |
URL |
规定iframe中显示的文档的URL |
width |
~px或~% |
规定iframe的宽度(可以使用像素或百分比) |
height |
~px或~% |
规定iframe的高度(可以使用像素或百分比) |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>内嵌框架</title>
</head>
<body>
<iframe name="topFrame" scrolling="auto" border="1" src="http://www.baidu.com" height="300px" width="100%">
//如果你看到该文字,说明该浏览器不支持iframe
</iframe>
<p><a href="http://www.sina.com" target="topFrame">新浪</a>
<a href="http://www.baidu.com" target="topFrame">百度</a>
</body>
</html>