开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜