Javascript function doesn't works well Can't set a property 'onclick' of null : I'v the following code :

    var exit = document.getElementById("exit");
    exit.onclick = function() {
       "use strict";
        document.getElementById("fadedDiv").style.display = "none" ; 
    };

but in the console i get the following error:

 script.js:107 Uncaught TypeError: Cannot set property 'onclick' of null

Although it works well with me before but,I don't no what the problem is 
 
plz help me 