0

嗨,当我尝试按照 HTML 运行时,我意识到我没有一些 jquery Css 文件。所以我可以获得这些 jquery 文件的在线链接吗?

以下是我的代码

<html>
<head>
<link rel="stylesheet" href="styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href="styles/jqx.fresh.css" type="text/css" />
<script type="text/javascript" src="scripts/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="jqwidgets/jqxbuttons.js"></script>
<script type="text/javascript" src="jqwidgets/jqxscrollbar.js"></script>
<script type="text/javascript" src="jqwidgets/jqxlistbox.js"></script>
<script type="text/javascript" src="jqwidgets/jqxdata.js"></script>
</head>
<body>
<div id="listbox">
</div>

<script>
// prepare the data
var data = new Array();
var firstNames = ["Nancy", "Andrew", "Janet", "Margaret", "Steven", "Michael", "Robert", "Laura", "Anne"];
var lastNames = ["Davolio", "Fuller", "Leverling", "Peacock", "Buchanan", "Suyama", "King", "Callahan", "Dodsworth"];
var titles = ["Sales Representative", "Vice President, Sales", "Sales Representative", "Sales Representative", "Sales Manager", "Sales Representative", "Sales Representative", "Inside Sales Coordinator", "Sales Representative"];
for (var i = 0; i < firstNames.length; i++) {
    var row = {};
    row["firstname"] = firstNames[i];
    row["lastname"] = lastNames[i];
    row["title"] = titles[i];
    data[i] = row;
}
var source =
{
    localdata: data,
    datatype: "array"
};
var dataAdapter = new $.jqx.dataAdapter(source);
$('#listbox').jqxListBox({ selectedIndex: 0, theme: 'fresh', source: dataAdapter, displayMember: "firstname", itemHeight: 70, height: 300, width: 400,
    renderer: function (index, label, value) {
        var datarecord = data[index];
        var imgurl = '../../images/' + label.toLowerCase() + '.png';
        var img = '<img height="50" width="45" src="' + imgurl + '"/>';
        var table = '<table style="min-width: 150px;"><tr><td style="width: 55px;" rowspan="2">' + img + '</td><td>' + datarecord.firstname + " " + datarecord.lastname + '</td></tr><tr><td>' + datarecord.title + '</td></tr></table>';
        return table;
    }
});
</script>
</body>
</html>
4

1 回答 1

0

你需要下载jqwidgets库,这里http://www.jqwidgets.com/download/

于 2013-11-27T18:42:21.237 回答