//改变时的事件 

$("#testSelect").change(function(){ //事件发生生 
jQuery('option:selected', this).each(function(){ //遍历选中值 
alert(this.value); 
}); 
}); 

 


//选到的项目

方法1:$("select#Clubs").children("[@selected]").each(function(){ 
alert(this.text); 
}); 
方法2:$("#selBags").val(); //这个比较快,但限单选 

 



//取得下拉选单的选择值
$(#testSelect option:selected').text(); 
或$("#testSelect").find('option:selected').text(); 

 





//移除 
removeOption(index/value/regex[, selectedOnly]) 


$('select#Clubs option:selected').remove(); 

 



//使某option变为selected 
 

var select = $(tdsEdit[0]).find("select"); //取得select 
$(select).children().each(function(){ 
if ($(this).text()=="option you want") 

 


//jQuery給法 
复制代码代码如下:
posted on 2013-12-04 14:17  mrma1989  阅读(316)  评论(0编辑  收藏  举报