(function () { var input = document.getElementById('forum-devushek'), checkbox = document.getElementById('mycheckbox'); if (input.value == 'Я согласна') { checkbox.checked = true; } });