在相当简单的HTML页面中,我添加了脚本。这与FF和Chrome完美搭配,不适用于Edge或IE。虽然IE问题我可以忍受一段时间,但我宁愿为Edge找到解决方案。
边缘在那条线上抛出引用的错误
pageQueryInput: document.getElementById('pageQueryInput'),
整个代码都是这样的:
function renderBooks(){
console.log('render');
console.log(document.getElementById('booksContainer'));
console.log(document.getElementById('pageQueryInput'));
// myPage creates variable storing some important nodes that are built with HTML (and not rendered by this function )and therefore can be determined immy after load event
const myPage ={
booksContainer: document.getElementById('booksContainer'),
pageQueryInput: document.getElementById('pageQueryInput'),
radio: [...(document.getElementById('radioInputs')).getElementsByTagName('input')],//xxxxxxxxxx
noBooksScreen: document.getElementById('noBooksModal'),
noBooksScreenContent: document.getElementById('noBooksModal-content'),
noBooksScreenCloseButton: document.getElementById('closeNoBooksScreen'),
form: document.getElementById('queryForm'),
resetButton: document.getElementById('resetButton'),
}```
That is just beginning of the function so the main brace is not locked. The code is more than simply. I have found some similar questions but none of such the simply case. Could someone have a look?