La copia del código es la siguiente:
<%@ page lenguaje = "java" contentType = "text/html; charset = utf-8"
PageEncoding = "UTF-8"%>
< %@taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %>
<! DocType html public "-// w3c // dtd html 4.01 transitional // en" "http://www.w3.org/tr/html4/loose.dtd">
<html>
<Evista>
<title> solo una vez que se puede enviar una solicitud dentro de un cierto período de tiempo </title>
<script type = "text/javaScript" src = "$ {pageContext.request.contextpath} /editor/jquery/jquery-1.4.4.min.js"> </script>
<meta http-equiv = "content-type" content = "text /html; charset = utf-8" />
<Script language = "javaScript">
var maxteMe = 10; // Establezca al menos 10 para enviar una solicitud
prueba de función (obj) {
if (obj.Value == 'enviar') {
controlar();
btn = setInterval ("Countdown ()", 1000);
}demás{
alerta ("¡Solo envíe una vez en un minuto!");
}
}
function Countdown () {
if (maxtee> = 0) {
segundos = Math.floor (Maxtee%60);
msg = "todavía hay"+segundos+"segundos" cuando termina la hora;
$ ("#btn"). Val (msg);
-Axtime;
}demás{
$ ("#btn"). Val ("cometer");
ClearInterval (BTN);
Maxtee = 10;
}
}
función check () {
alerta ("¡Jaja, soy yo!");
}
</script>
</ablo>
<Body>
<input type = "Button" id = "btn" value = "subt" onClick = "test (this)"/>
</body>
</html>