不处理时,当SELECT 渲染后,无法自动回发,可以如下操作:
<asp:DropDownList ID="ddlSearchProvince" runat="server" lay-filter="searchprovince" AutoPostBack="true" OnSelectedIndexChanged="ddlSearchProvince_SelectedIndexChanged"></asp:DropDownList>
<asp:DropDownList ID="ddlSearchCity" runat="server"></asp:DropDownList>
<script>
$(function () {
//监听选择框
layui.use(['form', 'laydate'], function () {
var form = layui.form;
form.on('select(searchprovince)', function (data) {
__doPostBack("ddlSearchProvince", "");
});
form.on('select(searchmachine)', function (data) {
__doPostBack("ddlSearchMachine", "");
});
form.render();
})
})
</script>
如里不想使用Layui渲染,可以这样处理:
<asp:DropDownList ID="ddlTableName" CssClass="layui-select" runat="server" lay-ignore>
</asp:DropDownList>
在后面加一个“ lay-ignore? ”? ,? 即可
|