<input id="image" type="text" value="url">
<div id="div">sefsegesgergres</div>
document.onclcik=function()
{
var image = document.getElementById("image").value;
var elem=document.getElementById('div');
elem.style.backgroundImage = "url(" + image +")";
}