文章分类 - JQuery UI
摘要:每一次操作select的时候,总是要出来翻一下资料,不如自己总结一下,以后就翻这里了。比如1、设置value为pxx的项选中 $(".selector").val("pxx");2、设置text为pxx的项选中 $(".selector").find("option[text='pxx']").at...
阅读全文
摘要:1.判断select选项中 是否存在Value=”paraValue”的Item $(“#selectid option[@value='paraValue']“).length>0 2.向select选项中 加入一个Item $(“#selectid”).append(“1111”); 3.从select选项中 删除一个Item $(“#selectid”).remove(“1111”); 4.修改select选项中 value=”paraValue”的text为”paraText” $(“#selectid option:selected”).attr(“value”
阅读全文
摘要:1、http://www.my97.net/dp/demo/index.htm一个很好的时间控件,可以下载其js文件,用在开发中非常好用选择日期从当天开始,第二个框只能选择第一个框中选择日期后的两个月内的日期有效时间: - ...
阅读全文
摘要:1. $("input[name='radio_name'][checked]").val();//选择被选中Radio的Value值 2. $("#text_id").focus(function(){//code...});//事件 当对象text_id获取焦点时触发 3. $("#text_id").blur(function(){//code...});//事件 当对象text_id失去焦点时触发 4. $("#text_id").select();//使文本框的Vlaue值成选中状态 5.
阅读全文
摘要:jQuery获取Select元素,并选择的Text和Value: 1. $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发 2. var checkText=$("#select_id").find("option:selected").text(); //获取Select选择的Text 3. var checkValue=$("#select_id").val(); //获取Select选择的Value 4. var ch
阅读全文