Posts

Showing posts with the label HTML5

How to remove plus and minus characters from input type number

Here is a solution on how to remove the plus and minus characters from the input type number and retain the existing value of the input field excluding the plus and minus symbols, i have used jquery for this hack this can also be achieved with plain javascript. Here is the code snippet which removes the plus and minus signs from number field See the Pen BxqXep by Purushothaman ( @purush97k ) on CodePen .

HTML5 | LocalStorage

HTML5 LocalStorage a feature that's been added to HTML5 specification, which enables storing data on clients machine, which can be retrieved and manipulated for future use unless the user clears the cache from browsers. Though we can store data there is a limitation as in how much we can store, the current max size of storing is 5Mb, which is quite a big amount, lets look how to store  and retrieve data on client's machine Storing data: To store data we use the native localStorage.setItem(key,value) method which expects two arguments as shown the key and the value like so: localStorage.setItem('user_name','purush'); Retrieving Data: To Retrieve data we use the native localStorage.getItem(key) method which expects one argument as shown which is the key, lets retrieve the previously stored data localStorage.getItem('user_name'); this will return 'purush' Clearing Data: To remove or clear stored data we can use either localStorage.rem...