Javascript examples for DOM HTML Element:Input Button
Get value from button
<html lang="en"> <head></head> <body translate="no"> <button onclick="confirmDelete(this)" value="True" name="deleteButton">Delete </button> <script> function confirmDelete(elem) { var theValue = elem.value;// ww w . ja v a2 s .c o m if (theValue == "True") { console.log("True"); } else { console.log("False"); } } </script> </body> </html>