gpt4 book ai didi

php - 关于 openJS 网格的几个新手问题

转载 作者:行者123 更新时间:2023-11-29 06:49:07 25 4
gpt4 key购买 nike

我正在玩 openJS 网格。看完所有视频,但仍然卡住了。我正在使用最新的 OpenJS Grid 2.1.5。这里有几个问题:

  1. 当我使用基本设置示例并将保存和删除设置为 true 时,我没有看到网格中显示任何一个。我错过了什么?

  2. 如何更改主题?该示例只有白色背景主题。我想将其更改为类似于视频教程的深色主题。我该怎么做?

  3. 如何选择行,突出显示列?我单击该列,它只是进行排序。单击单元格,它不会选择行,也不会像视频中那样将其放在顶部。

谢谢,

魏,

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com