if (typeof FileReader !== "undefined") { var size = document.getElementById('upload_file').files[0].size; size = Math.round(size / 1024); console.log(size+' KB'); }
Tag: html5
Can we change page URL, eg. when sending an ajax request, or opening an image in a light-box? HTML5: Changing the browser-URL without refreshing page Reference: http://spoiledmilk.dk/blog/html5-changing-the-browser-url-without-refreshing-page An often overlooked feature of HTML5 is the new “onpopstate” event. This new feature offers you a way to change the URL displayed in the browser* through javascript without … Continue reading Change page URL without refreshing page