View difference between Paste ID: pvnWBhTe and ciL44HL8
SHOW: | | - or go back to the newest paste.
1
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2
	pageEncoding="ISO-8859-1"%>
3
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="i"%>
4
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
<html>
6
<head>
7
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
8
<title>Registro Luz</title>
9
	
10
   <script>
11
    function enviar(operacion) {
12
            document.getElementById("accion").value = operacion;
13
            document.getElementById("formaUsuarios").submit();
14
    }
15
    </script>
16
17
18
</head>
19
<body>
20-
	<form action="EjemploServlet" method="post" forma.action = "ejemplo.servlet">
20+
	<form action="adminUsuarios.servlet" method="post">
21
	
22
		<center>
23
		
24
			Registro de luz <br> <br> <br> 
25
			Ingrese direccion:
26
			<input type="text" name="direccion"> <br> <br> 
27
			Ingrese medidor de luz: 
28
			<input type="text" name="medidor"> <br> <br> 
29
			Ingrese fecha de ingreso: 
30
			<input type="text" name="fecha">
31
		
32
			<br>
33
34
			<input type="hidden" name="accion" value="guardar">
35
36-
			 <input type="button" onclick="enviar('guardar')" value="Enviar"><input type="submit" value="Eliminar"><input type="submit" value="Modificar"> 
36+
			<!-- Como la accion ya tiene asignado guardar, no es necesario colocar onclick
37
			     en este botón -->
38
			<input type="submit" value="Enviar">
39
			<input type="button" onclick="enviar('eliminar')" value="Eliminar">
40
			<input type="button" onclick="enviar('modificar')" value="Modificar"> 
41
			
42
		</center>
43
	</form>
44
	<center>
45
		<br>
46
		<br> ${mensaje} <br>
47
		<br>
48
	</center>
49
50
</body>
51
</html>