Recuperation input type="data" en jsp
ScarfaceMontana
Messages postés
10
Date d'inscription
Statut
Membre
Dernière intervention
-
arth Messages postés 9374 Date d'inscription Statut Contributeur Dernière intervention -
arth Messages postés 9374 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
Je travail avec le HTML 5 et JSP, j'ai utilisé un <input type="date">, le probleme qui se pose comment récupérer la valeur de ce champ, voici mon code source:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<style>label{width: 100px; display: inline-block;}</style>
</head>
<body>
<form action="traitement.jsp" method=POST>
<h1>Recherche Etudiant</h1>
<label for="no">Numéro</label>
<input type="number" name="no" id="no" required /><br/>
<input type="submit" name="search">
</form>
<form action="traitement.jsp" method=POST>
<h1>Ajout Etudiant</h1>
<label for=num>Numero</label>
<input type=number name=num id=num required /><br/>
<label for=nom>Nom</label>
<input type=text name=nom id=nom required /><br/>
<label for=prenom>Prénom</label>
<input type=text name=prenom id=prenom required /><br/>
<label for=date_naiss>Date Naissance</label>
<input type=date name=date_naiss id=date_naiss /><br/>
<label for=groupe>Groupe</label>
<input type=number name=groupe id=groupe required /><br/>
<input type="reset" />
<input type=submit name="add" />
</form>
</body>
</html>
<%@page import="org.omg.PortableInterceptor.USER_EXCEPTION"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*" %>
<%@page import="java.io.*" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%
String date= resultat.getString("date");
out.println("date");
%>
</body>
........................................................
on m'affiche tjrs null
Je travail avec le HTML 5 et JSP, j'ai utilisé un <input type="date">, le probleme qui se pose comment récupérer la valeur de ce champ, voici mon code source:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<style>label{width: 100px; display: inline-block;}</style>
</head>
<body>
<form action="traitement.jsp" method=POST>
<h1>Recherche Etudiant</h1>
<label for="no">Numéro</label>
<input type="number" name="no" id="no" required /><br/>
<input type="submit" name="search">
</form>
<form action="traitement.jsp" method=POST>
<h1>Ajout Etudiant</h1>
<label for=num>Numero</label>
<input type=number name=num id=num required /><br/>
<label for=nom>Nom</label>
<input type=text name=nom id=nom required /><br/>
<label for=prenom>Prénom</label>
<input type=text name=prenom id=prenom required /><br/>
<label for=date_naiss>Date Naissance</label>
<input type=date name=date_naiss id=date_naiss /><br/>
<label for=groupe>Groupe</label>
<input type=number name=groupe id=groupe required /><br/>
<input type="reset" />
<input type=submit name="add" />
</form>
</body>
</html>
<%@page import="org.omg.PortableInterceptor.USER_EXCEPTION"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*" %>
<%@page import="java.io.*" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%
String date= resultat.getString("date");
out.println("date");
%>
</body>
........................................................
on m'affiche tjrs null
A voir également:
- Recuperation input type="data" en jsp
- App data - Guide
- Clear type - Guide
- Windows data recovery - Télécharger - Récupération de données
- Data (d:) - Forum Disque dur / SSD
- Appel data zone franche - Forum Consommation & Internet