Check if a div does NOT exist with javascript January 15, 2023 by Tarik var myElem = document.getElementById('myElementId'); if (myElem === null) alert('does not exist!');