- 注册时间
- 2012-6-21
- 最后登录
- 2012-6-22
- 阅读权限
- 10
- 积分
- 17
- 精华
- 0
- 帖子
- 1
|
文本框 取不出值 和样式表哪句有冲突 ,不解
===============================
参考
http://www.miniui.com/demo/#src=fit/fit.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>
<title>Fit Layout</title>
<script src="../../scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="../../scripts/miniui/miniui.js" type="text/javascript"></script>
<link href="../../scripts/miniui/themes/default/miniui.css" rel="stylesheet" type="text/css" />
<link href="../../scripts/miniui/themes/icons.css" rel="stylesheet" type="text/css" />
<style type="text/css">
html,body
{
width:100%;
height:100%;
border:0;
margin:0;
padding:0;
overflow:hidden;
}
</style>
</head>
<body >
<div class="mini-toolbar" style="padding:2px;border:0;">
<table style="width:100%;">
<tr>
<td style="width:100%;">
<a class="mini-button" iconCls="icon-addfolder" plain="true">增加</a>
<a class="mini-button" iconCls="icon-edit" plain="true">修改</a>
<a class="mini-button" iconCls="icon-remove" plain="true">删除</a>
<span class="separator"></span>
<a class="mini-button" iconCls="icon-reload" plain="true">刷新</a>
<span class="separator"></span>
<a class="mini-button" iconCls="icon-reload" plain="true">刷新</a>
</td>
<td style="white-space:nowrap;"><label style="font-family:Verdana;font-size:12px;">名称: </label>
<input type="text" id="key" class="mini-textbox"/>
<a class="mini-button" iconCls="icon-search" plain="true">查询</a>
</td>
</tr>
</table>
</div>
<!--撑满页面-->
<div class="mini-fit" style="background:red;height:100px;">
<div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;"
url="../server/json.php?m=area_list_m" idField="id"
sizeList="[5,10,20,50]" pageSize="10"
>
<div property="columns">
<div type="indexcolumn" width="10"></div>
<div field="area_name" width="120" headerAlign="center" allowSort="true">区域</div>
<div field="area_order" width="120" headerAlign="center" allowSort="true">排序</div>
</div>
</div>
</div>
<script type="text/javascript">
mini.parse();
var grid = mini.get("datagrid1");
grid.load();
function search() {
var key = document.getElementById("key").value;
alert (key);
// grid.load({ key: key });
}
$("#key").bind("keydown", function (e) {
if (e.keyCode == 13) {
search();
}
});
///////////////////////////////////////////////////////
</script>
</body>
</html>
红色部分是经过修改的,用JS弹出值测试
如果改为
<input type="text" id="key" /> 也就是去掉class 是可以取到值的
这个样式表有什么问题呢,为什么 不导致取不到值,求解! |
|