码迷,mamicode.com
首页 >  
搜索关键字:jquery操作select    ( 74个结果
jQuery操作select
无标题文档 $(function(){ //获取第一个option的值 var firstval=$('#selectID option:first').val(); alert(firstval); //获取最后一个option的值 var lastval =$('#selectID option:last').val(); alert(lastval);...
分类:Web程序   时间:2014-07-22 23:02:15    阅读次数:367
JQuery操作select中的option
html页面代码如下: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> http://www.w3.org/1999/xhtml">                   * { margin:0; padding:0; }       div.centent {                    flo...
分类:Web程序   时间:2014-06-08 16:53:59    阅读次数:424
Jquery 对select的操作
jquery对select下拉框的操作总结。。。1、通过索引值去设置select中的option的value和textvarindex=1;varval="该改为的值";$("#selectIdoption:eq("+index+")").attr("selected",true);$("#selectIdoption:selected").val(val);$("#selectIdoption:selected").text(val);
分类:Web程序   时间:2014-05-15 19:00:51    阅读次数:314
Jquery操作select小结
每次操作select都要查资料,干脆总结一下。为select设置placeholder为Select添加事件,当选择其中一项时触发$("#select_id").change(function(){ //code...});jQuery获取Select选择的Text和Value:var che...
分类:Web程序   时间:2014-05-08 05:48:25    阅读次数:509
74条   上一页 1 ... 6 7 8
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!