document.getElementById('clock').style.display = 'none';

document.getElementById('getval').addEventListener('change', readURL, true);
function readURL() {
    var file = document.getElementById("getval").files[0];
    var reader = new FileReader();
    reader.onloadend = function() {
        document.getElementById('clock').style.backgroundImage = "url(" + reader.result + ")";
    };
    if(file) {
        reader.readAsDataURL(file);
        document.getElementById('clock').style.display = 'block';
    }
    else {
        document.getElementById('clock').style.display = 'none';
    }
}