Javascript examples for DOM HTML Element:Input Button
change value of input type="Button" from edit to save
<html> <head> <title>editsavebutton</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> function edit_row(element1) {/* ww w . j a v a 2s. c o m*/ if (element1.value === "edit") { element1.value = "save"; } else { element1.value = "edit"; } } </script> </head> <body> <input type="button" value="edit" class="edit-btn" onclick="edit_row(this);"> </body> </html>