作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在玩 openJS 网格。看完所有视频,但仍然卡住了。我正在使用最新的 OpenJS Grid 2.1.5。这里有几个问题:
当我使用基本设置示例并将保存和删除设置为 true 时,我没有看到网格中显示任何一个。我错过了什么?
如何更改主题?该示例只有白色背景主题。我想将其更改为类似于视频教程的深色主题。我该怎么做?
如何选择行,突出显示列?我单击该列,它只是进行排序。单击单元格,它不会选择行,也不会像视频中那样将其放在顶部。
谢谢,
魏,
html文件
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="../bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" href="../grid.css" title="openJsGrid"/>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"/>
<script src="../jquery.js" type="text/javascript"></script>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"> </script>
<script src="../root.js"></script>
<script src="../grid.js"></script>
<script type="text/javascript">
$(function() {
$(".purchases").grid();
});
</script>
</head>
<body>
<h2>Insider Purphases</h2>
<table class="grid purchases" action="insider.php">
<tr>
<th col="Insider">Insider Name</th>
<th col="Company">Company</th>
<th col="Symbol">Symbol</th>
<th col="Amount">Amount</th>
<th col="Relationship">Relationship</th>
<th col="Date">Date</th>
</tr>
</table>
</body>
</html>
php文件
<?php
// connect to db
mysql_connect("localhost","root","");
mysql_select_db("insidertrades");
// require our class
require_once("../grid.php");
// load our grid with a table
$grid = new Grid("purchases", array(
"save"=>true,
"delete"=>true
));
?>
最佳答案
好的,至少在 javascript 中打开了编辑标志,带回了有意义的“保存”按钮。
<script type="text/javascript">
$(function() {
$(".purchases").grid({
editing:true
});
});
</script>
关于php - 关于 openJS 网格的几个新手问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16641458/
我使用此代码 http://www.openjs.com/scripts/events/keyboard_shortcuts/index.php用于处理键盘快捷键。 shortcut.add("C
我正在玩 openJS 网格。看完所有视频,但仍然卡住了。我正在使用最新的 OpenJS Grid 2.1.5。这里有几个问题: 当我使用基本设置示例并将保存和删除设置为 true 时,我没有看到网格
我一直在测试openjs grid v2.1 - 从修改ajax.php和index.php开始 - 我可以让网格显示数据,删除功能,排序和导航工作,但我似乎无法得到内联编辑工作正常,我已经尝试了一切
我是一名优秀的程序员,十分优秀!