复制代码代码如下:
<% @ Page Language = "Java" Import = "Java.util. *" Pageencoding = "UTF-8"%>
<%
String path = request.getContextPath ();
String basepath = request.getscheme () + ": //" + request.getServerName () + ":" + request.getServerport () + path + "/";
%>
<! Doctype html public "- // w3c // dtd html 4.01 transitional // en">
<html>
<adal>
<base href = "<% = baspath%>">
<Title> ma page de départ jsp 'checkbox.jsp' </Title>
<méta http-equiv = "pragma" contenu = "non-cache">
<meta http-equiv = "cache-control" content = "no-cache">
<méta http-equiv = "expires" content = "0">
<meta http-equiv = "keywords" contenu = "keyword1, keyword2, keyword3">
<méta http-equiv = "Description" content = "Ceci est ma page">
<script type = "text / javascript" src = "<% = request.getContextPath ()%> / jQuery / jQuery-1.7.min.js"> </ script>
<! -
<link rel = "stylesheet" type = "text / css" href = "Styles.css">
->
<script type = "text / javascript">
$ (function () {
// $ ("# box"). Cliquez sur (fonction () {
// if ($ ("# box"). attr ("coché") == "coché") {
// alert ("ss");
//}
//})
if ($ ("# box"). est (": cochée")) {
alert ("df");
}
})
</cript>
</ head>
<body>
<input type = "checkbox" id = "box" checked = "checked">
</docy>
</html>