This article mainly introduces the implementation of JQuery's time period drop-down selection. The example analyzes the skills for setting the time period drop-down options, which has some reference value, for more information, see the following example. Share it with you for your reference.
The specific implementation method is as follows:
The Code is as follows:
$ (Document). ready (function (){
Var arrT = [];
Var tt = "{0 }:{ 1 }";
For (var I = 0; I <24; I ++ ){
ArrT. push ({text: StrFormat (tt, [I> = 10? I: "0" + I, "00"]) },{ text: StrFormat (tt, [I> = 10? I: "0" + I, "30"])});
}
$ ("# START_TIME"). dropdown ({
Dropheight: 200,
Dropwidth: 60,
Selectedchange: function (){},
Items: arrT
});
$ ("# END_TIME"). dropdown ({
Dropheight: 200,
Dropwidth: 60,
Selectedchange: function (){},
Items: arrT
});
}
I hope this article will help you with jQuery programming.