The example in this article describes the method of setting a time period drop-down selection using JQuery. Share it with everyone for your reference.
The specific implementation method 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 be helpful to everyone’s jQuery programming.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn