I want a user to select a background image from his local drive using javascript
He can set an image (id='imageID') as shown below
html
java script
image_file.onchange = function() {
var files = this.files;
var file = URL.createObjectURL(files[0]);
imageID.src = file;}
But if I change the 'target' in to the backgroundImage of a div by changing the last line to the one shown below, it does not work...
document.getElementById('divID').style.backgroundImage.src= file;