在JavaScript中附加两个值

在JavaScript中附加两个值,javascript,jquery,html,Javascript,Jquery,Html,上面的函数使用jQuery.val()从一组行中的字段中获取输入值 此JS函数是if-else语句的一部分,该语句检查每行中是否有新值,并向表下方的下拉菜单项添加序号。我的问题是:如何将第一个值(描述)附加或连接到数字后的下拉菜单中?比如说, [1]说明输入(值) 一切正常,我只是不知道如何将jQuery函数传递回JS或附加每个值 我不知道这个应用程序是干什么用的,但是这个ID的到底是干什么用的21.125-mrss-cont-none-content,AGIM0:U:1:4:2:1:1:1:0

上面的函数使用jQuery.val()从一组行中的字段中获取输入值

此JS函数是if-else语句的一部分,该语句检查每行中是否有新值,并向表下方的下拉菜单项添加序号。我的问题是:如何将第一个值(描述)附加或连接到数字后的下拉菜单中?比如说,

[1]说明输入(值)


一切正常,我只是不知道如何将jQuery函数传递回JS或附加每个值

我不知道这个应用程序是干什么用的,但是这个
ID的
到底是干什么用的<代码>21.125-mrss-cont-none-content,
AGIM0:U:1:4:2:1:1:1:0:14
:Dauto多年前生成的代码:(
    var descriptionInput;
    var tbl = $(document.getElementById('21.125-mrss-cont-none-content'));
    tbl.find('tr').each(function () {
        $(this).find("input[name$='6#if']").keypress(function (e) {
            if (e.which == 13) {
                descriptionInput = $(this).val();
                $(this).val(descriptionInput);
                $(document.getElementById('__AGIM0:U:1:4:2:1:1::0:14')).val(descriptionInput);
            }
            console.log(descriptionInput);
        });

    });
});
var table = document.getElementById('DYN_6000-LISTSAPLMEGUI-tab');
    var t = table.rows.length;
    //getting current blank cell ID and upping the blank cell ID to the new last cell
    var new_cell_id = table.rows.item(t-1).id;
    var old_cell_id = "DYN_6000-LISTSAPLMEGUI-key-" + t;
    table.rows.item(t - 1).id = old_cell_id;
    table.rows.item(t - 1).onmouseover = function () { showItemDetailDropDown_hover(old_cell_id); };
    table.rows.item(t - 1).onmouseout = function () { showItemDetailDropDown_hover(old_cell_id); };
    table.rows.item(t - 1).onclick = function () { showItemDetailDropDown_click(old_cell_id); };
    //create new row and table
    var drop_down_height = document.getElementById('DYN_6000-LISTSAPLMEGUI-scrl').style.height;
    document.getElementById('DYN_6000-LISTSAPLMEGUI-scrl').style.height = (parseInt(drop_down_height.replace("px", "")) + 18) + "px";
    var new_row = table.insertRow(t-1);
    var new_cell = new_row.insertCell(0);
    new_row.insertCell(1);
    //set new row and cell properties
    new_row.id = new_cell_id;
    new_row.classList.add('urNoUserSelect');
    new_row.style.width = "100%";
    new_row.style.height = "18px";
    new_row.onmouseover = function () { showItemDetailDropDown_hover(new_cell_id); };
    new_row.onmouseout = function () {showItemDetailDropDown_hover(new_cell_id); };
    new_row.onclick = function () {showItemDetailDropDown_click(new_cell_id);};
    new_cell.classList.add('urIlb2I');
    new_cell.classList.add('urColorTxtStandard');

    var new_item = t;

    new_cell.innerHTML = "[ " + new_item + " ]";
    var zyx = "grid#21.125#" + row + ",2#if";

    document.getElementById(zyx).value = new_item;
    document.getElementById('__AGIM0:U:1:4:2:1:1::0:14').value = new_cell.innerHTML;
    checkButton('keyboard');