主要框架的代码:
<body>
<div id="adminLayout" fit="true">
<div region="north" title="North Title" split="false" noheader="true" style="height:90px;overflow:auto;" border="false">
<div style="float:right;margin-top:70px;">
<p>欢迎您登陆系统,
<span style="color:#F90;"><%= userName %> </span>
<img src="images/exit.png" align="texttop" /> <a href="javascript:void(0)" onclick="quit();">退出</a>
<span> </span>
</p>
</div>
<div>
<p style="width:400px; margin:0 auto;"><img src="images/font.png" style="margin-top:20px;" /></p>
</div>
</div>
<div region="south" title="South Title" split="false" noheader="true" style="height:40px;" border="true">
<p style="width:500px;margin:0 auto; margin-top:10px;">重庆邮电大学 版权所有 Tel:023-6477818 地址:重庆市南岸区崇文路2号附2号</p>
</div>
<div region="west" split="true" title="功能导航" iconCls="icon-blank" style="width:250px;" >
<ul id="tt"></ul>
</div>
<div region="center" border="true" >
<div id="menuTab" class="easyui-tabs" border="false" fit="true"></div>
</div>
<div id="projectDetailDialog"></div>
</div>
</body>
选项卡中也是用Layout布局的:
<div id="teacherProjectLayout" fit="true" border="false" >
<div region="north" border="false" style="margin:0 auto;overflow:hidden;" noheader="true">
<form id="teacherProjectForm" class="datagrid-toolbar" style="margin:0 auto;">
<fieldset style="width: 300px; border: 1px #09F solid;">
<legend>
<b>查询条件</b>
</legend>
<table>
<tr>
<td><b>项目名称</b><input type="text" name="pname" id="pname"/></td>
<td ><b>创建时间</b><input type="text" name="stimef" id="stimef" class="easyui-datetimebox" />-</td>
<td><input type="text" name="stimet" id="stimet" class="easyui-datetimebox" /></td>
</tr>
<tr>
<td><b>项目进度</b><input type="text" name="progress" id="progress"/></td>
<td><b>截止时间</b><input type="text" name="etimef" id="etimef" class="easyui-datetimebox" />-</td>
<td><input type="text" name="etimet" id="etimet" class="easyui-datetimebox" /></td>
<td>
<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-search" pain="false" onclick="searchProject();" ></a>
</td>
<td>
<a href="javascript:void(0);" class="easyui-linkbutton" pain="false" onclick="cleanProject();" >清空</a>
</td>
</tr>
<!-- <tr>
<td><b> 发布者</b><input type="text" name="pubname"/></td>
</tr> -->
</table>
</fieldset>
</form>
</div>
<div region="center" border="false" >
<table id="teacherProjectDatagrid"></table>
</div>
</div>
点击项目名称字段,弹出对话框方法:
showProjectDetail = function(i) {
var rows = teacherProjectDatagrid.datagrid('getRows');
var title = '项目详情_' + rows[i].pname;
console.info(title);
projectDetailDialog = parent.$('#projectDetailDialog', parent.document).dialog({
title:title,
modal:true,
collapsible:false,
width:800,
height:550,
href:'teacher/projectDetail.html'
});
projectDetailDialog.dialog('open');
}
在chrome浏览器正常,为什么会是这个效果呢,求解。
3 个解决方案
#1
找到原因了,写按钮链接的时候<a href="javascript:void(0);" /> 写错了,写成<a href="javascript:(0);" />了,改过来之后效果正常了
#2
呵呵,话说这种错误不好找,细心
#3
直接href="#" onclick="return xxx()"就好,干嘛喜欢用void
#1
找到原因了,写按钮链接的时候<a href="javascript:void(0);" /> 写错了,写成<a href="javascript:(0);" />了,改过来之后效果正常了
#2
呵呵,话说这种错误不好找,细心
#3
直接href="#" onclick="return xxx()"就好,干嘛喜欢用void