function hideShowTextBox(tabName, index, tabContainer) {
var tabIndex = index + 1;
var dropDownId = tabContainer + '_' + tabName + '_IncomeDetails' + tabIndex + '_dpEmploymentStatus';
//this line gives a blank value..What may be the problem???
alert($(dropDownId + ' option:selected').text());
}
答案 0 :(得分:2)
ID选择器必须以#
字符开头,例如#foo
。尝试:
var dropDownId = '#' + tabContainer + '_' + tabName + '_IncomeDetails' + tabIndex + '_dpEmploymentStatus';