使用easyui布局的 怎么可以点击按钮 在center打开界面 不发生跳转
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>老师信息管理中心</title>
<%
//权限验证
if(session.getAttribute("currentUser")==null){
System.out.println("滚");
response.sendRedirect("index.jsp");
return;
}
%>
<link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href=".easyui/themes/icon.css">
<script type="text/javascript" src="easyui/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">
$(function(){
// 数据
var treeData=[{
text:"信息管理",
children:[{
text:"学生发布广场",
attributes:{
url:"studentPlace.jsp"
}
},{
text:"老师发布广场",
attributes:{
url:"teacherPlace.jsp"
}
},{
text:"个人信息",
attributes:{
url:"mysession.jsp"
}
},{
text:"我发布的信息",
attributes:{
url:"Myself.jsp"
}
},{
text:"网站信息",
attributes:{
url:"webInstruction.jsp"
}
},{
text:"违规用户信息",
attributes:{
url:"manInfoManager2.jsp"
}
},{
text:"我的沟通",
attributes:{
url:"say.jsp"
}
},{
text:"我的订单",
attributes:{
url:""
}
}]
}];
// 实例化树菜单
$("#tree").tree({
data:treeData,
lines:true,
onClick:function(node){
if(node.attributes){
openTab(node.text,node.attributes.url);
}
}
});
// 新增Tab
function openTab(text,url){
if($("#tabs").tabs('exists',text)){
$("#tabs").tabs('select',text);
}else{
var content="<iframe frameborder='0' scrolling='auto' style='width:100%;height:100%' src="+url+"></iframe>";
$("#tabs").tabs('add',{
title:text,
closable:true,
content:content
});
}
}
});
</script>
</head>
<body class="easyui-layout">
<div region="north" style="height:120px; background-color:#E0EDEF">
<img src="image/3.jpg">
<input type="button" value="学生发布广场" onclick="javascrtpt:window.location.href='studentPlace.jsp'" target="main">
当前用户: <font color="red" >${currentUser.userName }</font>
<a href="studentPlace.jsp" target="center"> 学生发布广场</a>
</div>
<div region="center" style="height:1000px;" name="main" title="欢迎使用">
<div class="easyui-tabs" border="false" id="tabs">
<div title="首页">
<div align="center" style="padding-top: 100px;"name="main"><font color="red" size="10">欢迎使用</font></div>
</div>
</div>
</div>
<div region="west" style="width:150px;" title="导航菜单" split="true">
<ul id="tree"></ul>
</div>
<div region="south" style="height:25px;" align="center">版权所有<a href="http://www.baidu.com">www.baidu.com</a></div>
</body>
</html>