Возможно ли передать response в конструктор? new PaginationQuestion(1, 12, 'withTags', response.items[i].id)
+ '<div class="mb-1" onclick="new PaginationQuestion(1, 12, \'withTags\', ).setQuestions()">'
+ response.items[i].name
+ '</div>'
+ '<span id="spanX">'
'<span class="item-multiplier-count" id="Tag-countId">'+ response.items[i].id + '</span>'
+ '<div class="mb-1" onclick="new PaginationQuestion(1, 12, \'withTags\', document.getElementById(\'Tag-countId\').value).setQuestions()">'
jsчерез свойствоonclickлибо метод.addEventListener– Grundy Jan 18 '21 at 22:17-изid. В этом случае можешь сразуresponse.items[i].idв строку встраивать а не пытаться взять из элемента, в данном случае тем более надо было использоватьtextContentа неvalue. Невозможно именно объект передать, так как в текущем виде у тебя строка или число - то вполне можно просто встроить в собираемую строку – Grundy Jan 18 '21 at 23:55textContentпроходит, спасибо большое! – Roman Jan 19 '21 at 00:02'<span class="item-multiplier-count" id="Tag-countId">'+ response.items[i].id + '</span>'ты встраиваешь в строку значениеresponse.items[i].id- вставляй его сразу в нужное место иdocument.getElementById(\'Tag-countId\').valueуже не нужен – Grundy Jan 19 '21 at 00:10