首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

左方导航栏 右边内容 用js javascript 实现

2012-11-25 
左边导航栏 右边内容 用js javascript 实现js代码-----------------------------------------------------

左边导航栏 右边内容 用js javascript 实现
js代码
------------------------------------------------------
说明:当执行showContent时,在id为right_content的ifame框架中显示该url所指向的html或者jsp文件

<script type="text/javascript">function showConent(url) {var p = document.getElementById("right_content");p.src=url;}</script> 

-------------------------------------------------------
html代码
说明:其中的sf.html是自己的一个已经存在的html文件
当点击修改信息时,则在id为rigth_content的ifame的框架中显示sf.html
<div id="left_part"><span>用户管理</span><a href="javascript:void(0);" onmousedown="showConent('sf.html')">修改信息</a></div>     <div id="right_part"><iframe src="" id="right_content" scrolling="no"></iframe></div>

热点排行