前臺: <title>標題</title> <link href="EasyUi_v1.3.4/easyui/themes/default/easyui.css" rel="stylesheet" /> <link href="EasyUi_v1.3.4/easyui/themes/icon.css ...
前臺:
<title>標題</title>
<link href="EasyUi_v1.3.4/easyui/themes/default/easyui.css" rel="stylesheet" />
<link href="EasyUi_v1.3.4/easyui/themes/icon.css" rel="stylesheet" />
<script src="EasyUi_v1.3.4/jquery-1.7.1.min.js"></script>
<script src="EasyUi_v1.3.4/easyui/jquery.easyui.min.js"></script>
<script src="EasyUi_v1.3.4/easyui-lang-zh_CN.js"></script>
<script src="EasyUi_v1.3.4/Common.js"></script>
<script>
$(function () {
$.ajax({
url: "WebForm1.aspx",//請求後臺數據
data: { "type": "getList" },//傳遞參數
dataType: "json",//這句代碼必須有,否則就會出現以下情況
success: function (data) {
//console.log(data);
$("#強度等級").combobox({
data: data,
textField: 'StrengthLevel',
valueField: 'ID',
});
}
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="data4">
<select id="強度等級" class="easyui-combobox" style="width: 160px; height: 20px;">
</select>
</div>
</form>
</body>
後臺: