Archive for the ‘DHML’ Category

How to refresh the page using javascript

3 Ways to refresh/reload the page using javascript

  1. <input type=”button” value=”Reload Page” onClick=”window.location.reload()”>
  2. <input type=”button” value=”Reload Page” onClick=”history.go(0)”>
  3. <input type=”button” value=”Reload Page” onClick=”window.location.href=window.location.href”>

,

No Comments


How to limit the character entered in TextArea

Sample HTML:

Javascript:

function limit(oTextArea) {
return oTextArea.value.length != oTextArea.getAttribute(“maxlength”);
}

, ,

No Comments



SetPageWidth