Bug Tracker

Opened 13 years ago

Closed 13 years ago

#1074 closed bug (fixed)

$.html(val) can not be used to Select Element

Reported by: clmm Owned by: john
Priority: major Milestone: 1.2.2
Component: core Version: 1.1.3
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by john)

var optionStr = "<option value="-1" '''selected="selected"'''>選択</option>";
jQuery.each(fileNameArr,function(i,n){
	optionStr += "<option value=""+i+"">"+n+"</option>";
});

The option which value is "-1" will be selected as suppose. But $.html(val) look like no useless to this.

correct: document.getElementById('search-type').innerHTML = optionStr; correct: jQuery("#search-type").get(0).innerHTML = optionStr; wrong: jQuery("#search-type").html(optionStr);

Change History (2)

comment:1 Changed 13 years ago by john

Description: modified (diff)
Milestone: 1.1.31.1.4
Owner: set to john
Version: 1.1.21.1.3

comment:2 Changed 13 years ago by davidserduke

Milestone: 1.1.41.2.2
Resolution: fixed
Status: newclosed

Fixed in [3844].

Note: See TracTickets for help on using tickets.