layui select回顯 Layui框架中“l(fā)ayui-this”這個(gè)屬性怎么動態(tài)?
Layui框架中“l(fā)ayui-this”這個(gè)屬性怎么動態(tài)?首先,偵聽click事件,刪除Li的所有l(wèi)ay UI this屬性,然后將lay UI this屬性設(shè)置為所需的Li。請參閱JQ示例:$(”。
Layui框架中“l(fā)ayui-this”這個(gè)屬性怎么動態(tài)?
首先,偵聽click事件,刪除Li的所有l(wèi)ay UI this屬性,然后將lay UI this屬性設(shè)置為所需的Li。
請參閱JQ示例:
$(”。Layui NAV項(xiàng)目“)。在(“click”,function(){
//if(!$(這個(gè))。Hasclass(“l(fā)ayui this”){
$(this)。Addclass(“l(fā)ayui this”)。兄弟姐妹(”。Layui NAV項(xiàng)目“)。Removeclass(“l(fā)ayui this”)//點(diǎn)擊判斷沒有l(wèi)ayui this,添加其他,刪除它們
}
laydate日期控件設(shè)置開始時(shí)間小于結(jié)束時(shí)間,怎么做?
]<label for=“date”> start date</label><input type=“text”Id=“start”name=“time”class=“form control laydate icon”/><label for=“date”> end date</label><input type=“text”id=“end”name=“Endtime”class=“form control laydate icon”/><script>var start={元素:“time”,格式:“yyyy-mm-dd”,選擇:函數(shù)(日期){end.min=日期結(jié)束.start=date}var end={elem:“endtime”,格式:“YYYY-MM-DD”選擇:函數(shù)(日期){start.max=日期}}Laydate(start)Laydate(end)</script>然而,有一個(gè)問題,即將根據(jù)第一次的時(shí)間范圍選擇第二次,你可以自己解決