internet_programming/laba3/ip laba3/js/option.js

20 lines
576 B
JavaScript
Raw Normal View History

2023-12-22 14:06:40 +04:00
import { hideUpdateModal, showUpdateModal } from "./lines-modal";
import {
createLine, deleteLine, getAllItemTypes, getAllColorTypes, getAllLines, updateLine,
} from "./lines-rest-api";
import {
cntrls, createItemsOption, createTableRow, imagePlaceholder,
} from "./lines-ui";
console.log("hi")
document.getElementById('item').addEventListener('change', function() {
const element = document.getElementById('optionHidden');
if (cntrls.itemsType.value == false) {
element.setAttribute('hidden',true);
} else {
element.removeAttribute('hidden');
}
});