假设您的文件都是正确的,我建议将您的jquery函数调用包装在.这样,只有在 DOM 准备好通过 Javascript 进行编辑时,它们才会运行。document.ready
<script>
$(document).ready(function(){
$("#brands_table").html("asd");
$("#brands_table").jsGrid({
width: "100%",
height: "400px",
filtering: true,
inserting:true,
editing:true,
sorting:true,
paging:true,
autoload:true,
pageSize:10,
pageButtonCount:5,
deleteConfirm:"Silmek istediğinize emin misiniz?",
controller:{
loadData: function (filter) {
return $.ajax({
type:"GET",
url:"assets/php/getbrands.php",
data:filter
});
},
},
fields:[
{
name:"id",
type:"hidden",
css:'hide'
},
{
name:"name",
type:"text",
width:150,
validate:"required"
},
{
type: "control"
}
]
});
});
</script>
函数式编程
LEATH
守着一只汪
相关分类