开发者

I have a function in jQuery and it does not work as expected

开发者 https://www.devze.com 2023-01-11 19:46 出处:网络
function hideShowTextBox(tabName, index, tabContainer) { var tabIndex = index + 1; var dropDownId = tabContainer + \'_\' + tabName + \'_IncomeDetails\' + tabIndex + \'_dpEmploymentStatus\';
function hideShowTextBox(tabName, index, tabContainer) {
  var tabIndex = index + 1;
  var dropDownId = tabContainer + '_' + tabName + '_IncomeDetails' + tabIndex + '_dpEmploymentStatus';

  //this l开发者_Go百科ine gives a blank value..What may be the problem???
  alert($(dropDownId + ' option:selected').text()); 
}


ID selectors must begin with the # character, e.g.#foo. Try:

var dropDownId = '#' + tabContainer + '_' + tabName + '_IncomeDetails' + tabIndex + '_dpEmploymentStatus';
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号