document.querySelector('input').addEventListener('change', () => { const file = document.querySelector('input').files[0] alert( `The file ${file.name} was last modified on ${new Date( file.lastModified, ).toDateString()}`, ) })...
Now let’s add an indicator to let the user know that they have indeed dragged the item over the correct area by using CSS to change the color of the border color of the drop area. The styles should already be there under the#drop-area.highlightselector, so let’s use JS to add a...
Username checking:On the homepage of the chat, when you choose your username, jQuery is there watching that text input. When you type a character (on keyup) it asks a certain PHP file (via AJAX) if that username is in use. The PHP file responds with a yes or no, and a message is...
Note: As we looked at earlier, the FileSystem API is only available to apps served usinghttp://orhttps://so you will need to be using a local development server for this tutorial. If you don’t already have one installed on your computer take a look atXAMPP. Create a file calledindex...