Bonsoir,
Je suis bloqué sur un problème que je n'arrive pas à résoudre.
Pouvez-vous m'aider ?
J'ai une page en .html qui fonctionne et la même page en .jsp ne fonctionne pas.
Le but: faire apparaître datepicker de Bootstrap.
Merci de votre,
page HTML:
Page JSP:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Datepicker for Bootstrap</title> <link href="css/bootstrap.css" rel="stylesheet"> <link href="css/datepicker.css" rel="stylesheet"> <style> .container { background: #fff; } #alert { display: none; } </style> <script src="js/google-code-prettify/prettify.js"></script> <script src="js/jquery-1.7.1.min.js"></script> <script src="js/bootstrap-datepicker.js"></script> <script> $(function(){ window.prettyPrint && prettyPrint(); $('#dp1').datepicker({ format: 'mm-dd-yyyy' }); var startDate = new Date(2012,1,20); var endDate = new Date(2012,1,25); }); </script> </head> <body> <div class="well"> <input type="text" class="span2" value="" id="dp1" > </div> </body> </html>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47 <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta charset="utf-8"> <title>Datepicker for Bootstrap</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/bootstrap-responsive.css" rel="stylesheet"> <link href="css/bootstrap.css" rel="stylesheet"> <link href="css/datepicker.css" rel="stylesheet"> <style> .container { background: #fff; } #alert { display: none; } </style> <script src="http://code.jquery.com/jquery-latest.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/google-code-prettify/prettify.js"></script> <script src="js/jquery-1.7.1.min.js"></script> <script src="js/bootstrap-datepicker.js"></script> <script> $(function(){ window.prettyPrint && prettyPrint(); $('#dp1').datepicker({ format: 'mm-dd-yyyy' }); var startDate = new Date(2012,1,20); var endDate = new Date(2012,1,25); }); </script> </head> <body> <div class="well"> <input type="text" class="span2" value="" id="dp1" name="dp1"> </div> </body> </html>
Partager