Home > Web Front-end > JS Tutorial > body text

JQuery set time period drop-down selection example_jquery

WBOY
Release: 2016-05-16 16:23:08
Original
1399 people have browsed it

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:

Copy code 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 be helpful to everyone’s jQuery programming.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template