jQuery(function () { gamumail(); //onAjaxLoad(gamumail); function gamumail() { let cc = $('#cc').val(); if (cc) { let Tcc = cc.split(','); if (Tcc.length) { let tag_cc = ''; Tcc.forEach((e) => { tag_cc = `${e}`; console.log(tag_cc); $('#tag_cc').val(tag_cc); }); } console.log(Tcc); } } });