先看看我写的
---------------------------------------------------
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文件</title>
</head>
<frameset rows="59,*" frameborder="no" border="0" framespacing="0">
<frame src="head.html" noresize="noresize" frameborder="0" name="topFrame" marginwidth="0" marginheight="0" scrolling="no">
<frame src="left.html" noresize="noresize" frameborder="0" name="topFrame" marginwidth="0" marginheight="0" scrolling="no">
<frameset rows="*" cols="195,*" id="frame">
<frame src="right.html" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes">
</frameset>
<frame src="UntitledFrame-1" noresize="noresize" frameborder="0" name="bottomFrame" marginwidth="0" marginheight="0" scrolling="no">
<noframes>
<body></body>
</noframes>
</frameset>
</html>
-------------------------------------------
head.html
-------------------------------------------
<a href="#" onClick="switchBar(this)">1111</a>
2222
3333<a href="right1.html" target="main">111</a>
<a class="top_link" href="right2.html" target="main">222</a>
-------------------------------------------
left.html
-------------------------------------------
<body>
<div id="left">sad</div>
</body>
-------------------------------------------
right.html
-------------------------------------------
<body>
<div id="right">sad</div>
</body>===================
我想点击head.html的按钮然后让righ.html页面变化 但是为啥不再本页打开,而另开了一个新页面?我想左边个上边部分不变,只变右边部分,怎么解决啊?
---------------------------------------------------
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文件</title>
</head>
<frameset rows="59,*" frameborder="no" border="0" framespacing="0">
<frame src="head.html" noresize="noresize" frameborder="0" name="topFrame" marginwidth="0" marginheight="0" scrolling="no">
<frame src="left.html" noresize="noresize" frameborder="0" name="topFrame" marginwidth="0" marginheight="0" scrolling="no">
<frameset rows="*" cols="195,*" id="frame">
<frame src="right.html" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes">
</frameset>
<frame src="UntitledFrame-1" noresize="noresize" frameborder="0" name="bottomFrame" marginwidth="0" marginheight="0" scrolling="no">
<noframes>
<body></body>
</noframes>
</frameset>
</html>
-------------------------------------------
head.html
-------------------------------------------
<a href="#" onClick="switchBar(this)">1111</a>
2222
3333<a href="right1.html" target="main">111</a>
<a class="top_link" href="right2.html" target="main">222</a>
-------------------------------------------
left.html
-------------------------------------------
<body>
<div id="left">sad</div>
</body>
-------------------------------------------
right.html
-------------------------------------------
<body>
<div id="right">sad</div>
</body>===================
我想点击head.html的按钮然后让righ.html页面变化 但是为啥不再本页打开,而另开了一个新页面?我想左边个上边部分不变,只变右边部分,怎么解决啊?
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文件</title>
</head>
<frameset rows="59,*" frameborder="no" border="0" framespacing="0">
<frame src="head.html" noresize="noresize" frameborder="0" name="topFrame" marginwidth="0" marginheight="0" scrolling="no">
<frameset cols="195,*" id="frame">
<frame src="left.html" noresize="noresize" frameborder="0" name="leftFrame" marginwidth="0" marginheight="0" scrolling="no">
<frame src="right.html" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes">
</frameset>
<noframes>
<body></body>
</noframes>
</frameset>
</html>
没有的话,就拼接个<a>
//把right的name设为 main 然后连接页面的时候<a href="#" tager="main"></a>就OK 了