首页 相关文章 jquery select操作的日期联动实现代码

jquery select操作的日期联动实现代码

Jquery的选择器很强大,对select的options对象添加的时候我找了老半天才找到
代码如下:
/**//*
文件名:jquery.liu.select.js
功能说明:本js文件为jquery类库的一个插件,主要实现对select的操作.
作者:John Liu
编写日期:2008/03/12
*/
//得到select项的个数
jQuery.fn.size = function()
{
return jQuery(this).get(0).options.length;
}
//获得选中项的索引
jQuery.fn.getSelectedIndex = function()
{
return jQuery(this).get(0).selectedIndex;
}
//获得当前选中项的文本
jQuery.fn.getSelectedText = function()
{
if(this.size() == 0)
{
return "下拉框中无选项";
}
els...[ 查看全文 ]

2016-02-19 标签:

jquery select操作的日期联动实现代码的相关文章

手机页面
收藏网站 回到头部