天天看点

解决vs2010中文本编辑器对frameset不支持

vs2010,vs2008都不支持frameset,或者说会对使用frameset提出警告。

其实说实话,对使用效果根本木有影响,但是那么多提示小横线看得老夫很烦躁啊。现在提示解决办法:

工具—>选项—>文本编辑器—>html—>验证—>选择“xhtml.0 frameset”

其余的默认。看看,这样是不是轻松搞定了!哈哈!

下面给个使用frameset的小例子:

index.aspx

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

 <title></title>

</head>

<frameset cols="20%,*">

<frame src="1.aspx" name="frame1" noresize="noresize" />

<frame src="2.aspx" name="frame2" noresize="noresize" />

</frameset>

</html>

1.aspx

<body>

    <form id="form1" runat="server">

    <div>

    <a href="http://www.baidu.com" target="frame2">百度链接</a>

    </div>

    </form>

</body>

2.aspx

暂时不放内容,但点击1.aspx的链接时候,2.aspx会显示百度的页面。