關於easyUI的一些js方法

2022-08-30 12:00:12 字數 561 閱讀 6480

1.

$("#dg").datagrid("load",);

資料表的load方法,用於載入資料,後面可以寫上引數,格式為:中間用逗號分開

2.$("#dlg").dialog("open").dialog("settitle","新增使用者資訊");

可以開啟對話方塊的方法,後面是設定標題

3.$("#dg").datagrid("getselections");

獲取資料表中選中的行

4.$.messager.alert("系統提示", "請選擇一條要編輯的資料!");

easyui 的 alert方法

5.$("#fm").form("submit",

return $(this).form("validate");

},success:function(result)else

}});

easyui提交表單的方法

6.$("#dlg").dialog("close");

關閉對話方塊

7.easyui $.post方法一定要指定為json格式,否則後台傳來的資料無法解析

easyui 一些常用方法

設定輸入框賦值 charpname textbox setvalue list.name 設定輸入框賦值並禁用 charpname textbox setvalue list.name textbox disable 下拉框獲取值 id combobox getvalue 設定下拉框載入資料 id ...

JS關於獲取元素的一些方法

js關於獲取元素的一些方法 document.getelementbyid id 可能會獲取到很多相同屬性的元素,所以通過key值去選擇。document.getelementsbyclassname classname 0 document.getelementbyid id children 0...

關於js的一些東西

常用的函式 slice 選取陣列值 用法 var arry a b c d arry.slice 1 結果 a,b arry.slice 1,3 結果b,c splice 向 從陣列中新增 刪除專案,然後返回被刪除的專案。用法 var arry a b c d arry.splice 2,0,e 結...