// task 11
let userVal = document.getElementById('task11')
let trueVal = 'title'
let check = document.getElementById('check')
check.onclick = function() {
if (userVal.value === trueVal) {
document.querySelector('.true').style.display = 'block';
}
}
let input = document.querySelector('.i').value;
let a = [1, 2, 4, 6, 15, 918];
let b = document.querySelector('.b');
let input = document.querySelector('.i');
let out = document.querySelector('.out-1');
b.onclick = () => {
if (a.indexOf(+input.value) != -1) {
out.innerHTML = input.value;
}
}
num_click_chekbox
if(num_click_chekbox <= 0) var num_click_chekbox = 0;
if(num_click_checkbox <= 0) var num_click_checkbox = 0;
$('.hook_extracarrier').show();
num_click_chekbox = 1;
document.querySelector('button').addEventListener('click', function() {
console.log(document.querySelector('[type="radio"]:checked').value);
});
innerHTML
document.getElementById("hex").innerHTML = theInput.value;
value
document.getElementById("hex").value = theInput.value;
input
document.querySelectorAll('.other-price').forEach(n => {
n.textContent = +n.textContent +
parseInt(document.querySelector('.current-price').textContent.split(' ').join(''));
});
.active { display: none }
const lists = document.querySelectorAll('.dropdown-list');
lists.forEach(list => list.classList.add('active'));
document.querySelectorAll('.dropdown-item span').forEach((item, itemIndex) => {
item.addEventListener('click', function() {
lists.forEach((list, listIndex) => {
if (itemIndex === listIndex) {
list.classList.toggle('active');
}
});
});
});
$('#filter').on('input', function() {
$('#ffilter').val($(this).val());
});
$('#ffilter').on('input', function() {
$('#filter').val($(this).val());
});
<select id="select"></select>
const select = document.querySelector('#select');
for (let i = 1; i <= 100; i++) {
const option = document.createElement('option');
option.textContent = option.value = i;
select.append(option);
}