日期:2014-05-16  浏览次数:20433 次

???javascript 不刷新改变内容
我现在的页面     是左边放了几个链接,然后点了这个链接,右边的内容区域,出现不同的   文字或者flash,   然后页面部要刷新,怎么做到,谢谢

------解决方案--------------------
总框架
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> 框架 </title>
</head>

<frameset cols= "80,* " frameborder= "yes " border= "1 " framespacing= "0 ">
<frame src= "Left.html " name= "leftFrame " scrolling= "No " noresize= "noresize " id= "leftFrame " title= "leftFrame " />
<frame src= "Right.html " name= "rightFrame " id= "rightFrame " title= "rightFrame " />
</frameset>

<noframes>
<body>
</body>
</noframes>

</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=gb2312 " />
<title> 左 </title>
<script language= "javascript " type= "text/javascript ">
function h(a)
{
window.parent.frames( "rightFrame ").document.getElementById( "hp ").innerHTML = a.title;
}
</script>
</head>

<body>
<ul>
<li> <a id= "a1 " href= "javascript: " title= "HZT " onclick= "h(this); "> HZT </a> </li>
<li> <a id= "a2 " href= "javascript: " title= "GCL " onclick= "h(this); "> GCL </a> </li>
</ul>
</body>
</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=gb2312 " />
<title> 右 </title>
</head>

<body>
<p id= "hp "> 点击左框架链接改变我的值 </p>
</body>
</html>