欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

基于Jquery的將DropDownlist的選中值賦給label的實(shí)現(xiàn)代碼

 更新時(shí)間:2011年05月06日 14:43:52   作者:  
使用Jquery 將DropDownlist的選中值賦給label的代碼,需要的朋友可以參考下。
jquery代碼
復(fù)制代碼 代碼如下:

$(function() {
$("#DropDownList1").bind("change", function() {
$("#Label1").text($("#DropDownList1 option:selected").text());

});

或者
復(fù)制代碼 代碼如下:

$("#DropDownList1").bind("change", function() {
$("#Label1").text($("#DropDownList1").val());
});

其中對(duì)這個(gè)解釋下:

var name = $("#DropDownList1 option:selected").val(); //獲取dropdownlist 里面選中的值
var name1 = $("#DropDownList1").text(); //獲取dropdownlist 里面所用的值

相關(guān)文章

最新評(píng)論