document.querySelector('input[name="D"]').value = DNUM
document.querySelector('input[name="I"]').value = INUM
document.querySelector('input[name="S"]').value = SNUM
document.querySelector('input[name="C"]').value = CNUMconst data = {
D: DNUM,
I: INUM,
S: SNUM,
C: CNUM,
}а дальше как в этом примере <a href="//example.com">
<img src="/images/play.png" alt="foo bar">
</a> but2.style.visibility = 'visible' word-wrap: normalword-break: break-all<a href="http://example.com" class="parent-window-link">example</a>
<a href="http://google.com" class="parent-window-link">google</a>document.addEventListener('click', function(evt) {
if (evt.target.matches('a.parent-window-link')) {
window.top.location = evt.target.href // <-- all magic here
return false
}
})