0
在這裏學習jquery,我想在我的網頁上顯示我的SQL表。我有我的jquery的「外殼」匹配的SQL表和我的web.config設置正確,但我的jQuery不加載數據。它說url: 'ConnectionString',
我希望它指向我的表或web.config文件。我能在這裏做什麼。我需要一些指導,因爲這是我學習的東西。Jquery和SQL數據表
感謝
<script type='text/javascript'>
$(function() {
$("#list").jqGrid({
url: 'Default.aspx',
datatype: 'xml',
mtype: 'GET',
colNames: ['Inv No', 'Date', 'Amount', 'Tax', 'Total', 'Notes'],
colModel: [
{ name: 'ID', index: 'ID', width: 55 },
{ name: 'Date', index: 'Date', width: 90 },
{ name: 'amount', index: 'amount', width: 80, align: 'right' },
{ name: 'tax', index: 'tax', width: 80, align: 'right' },
{ name: 'total', index: 'total', width: 80, align: 'right' },
{ name: 'note', index: 'note', width: 150, sortable: false }
],
pager: '#pager',
rowNum: 10,
rowList: [10, 20, 30],
sortname: 'invid',
sortorder: 'desc',
viewrecords: true,
caption: 'Joshs first grid'
});
});
</script>
我的aspx部分如下
<div class="ui-widget">
<table id="list"></table>
<div id="pager"></div>
</div>