<html> <body> <script language="JavaScript"> function function1() { var m = document.getElementById("myButton").defaultValue; alert("The value of this element is: "+'"'+m+'"'); } </script> <input id="myButton" type="button" value='Click here' onclick="function1();"> </body> </html>
Related Scripts with Example Source Code in same category :