前端工具:MyCodepen】| 【W3School】| 【Bootstrap】| 【MarkDown】| 【正则表达式】| 【图标下载】| 【在线工具】| 【W3标准及兼容】| 【前端中文文档

angularjs制作的iframe后台管理页切换页面

<code>

<!DOCTYPE html>
<html lang="zh" ng-app>
<head>
<meta charset="UTF-8"/>

<title>我的个人笔记</title>
<link rel="stylesheet" href="./style/csslib/bootstrap.css" />
<script type="text/javascript" src="./script/jslib/angular.js"></script>
<script type="text/javascript" src="./script/jslib/jquery.js"></script>
<script type="text/javascript" src="./script/jslib/bootstrap.js"></script>
<script type="text/javascript" src="./script/js/controller.js"></script>
<style type="text/css">
.body-left{
background-color: #ddd;
min-height: 500px;
}
.body-right{
min-height: 500px;
margin: 0px;
padding: 0px;
}
iframe{
width: 100%;
scrolling:auto;
frameborder:0;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$('.body-left').height($(window).height());
$('.body-right').height($('.body-left').height());
$('.right-content').height($(window).height()-5 + "px");

});

function qiehuan(name){
document.myiframe.location= name;
}
</script>
</head>
<body>
<div class="col-md-3 body-left" ng-controller="MenuListCtrl">
<div class="panel-group menu" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default" ng-repeat="menu in menus">

<div class="panel-heading">
<a data-toggle="collapse" data-parent="#accordion" href="#{{menu.name}}" aria-expanded="true" aria-controls="collapseOne">
<h4 class="panel-title">
{{menu.name}}
</h4>
</a>
</div>
<div id="{{menu.name}}" class="panel-collapse collapse" role="tabpanel">
<div class="list-group" style="margin-bottom: 0px;" onclick="qiehuan('./view/angularjs.html')">
<a href="#" class="list-group-item">{{menu.biji}}</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-9 body-right">
<iframe name="myiframe" src="" class="right-content" frameborder="0" scrolling="auto"></iframe>
</div>
</body>
</html>

 

</code>

posted @ 2014-09-12 17:43  FuGardenia  阅读(5951)  评论(0编辑  收藏  举报

关于我们

喜欢编程。
上大学四年,一直在探索。
最终走上前端工程师的不归路。


我的微博:

@WOOEOOBOO

GitHub:

@FuGardenia

关注我们

微信号:MoveClouds
移动互联网,云前端信息传播自媒体。

Simple is beauty,Less is more.

简而美,少即多。