复制代码代码如下::
<%@ page Language = "java" import = "java.util.*" pageCoding = "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>
<kopf>
<Basis href = "<%= Basepath%>">
<title> My JSP 'Checkbox.jsp' Startseite </title>
<meta http-äquiv = "pragma" content = "no-cache">
<meta http-äquiv = "cache-control" content = "no-cache">
<meta http-äquiv = "abläuft" content = "0">
<meta http-equiv = "keywords" content = "keyword1, keyword2, keyword3">
<meta http-äquiv = "Beschreibung" content = "Dies ist meine Seite">
<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"). click (function () {
// if ($ ("#box"). attr ("geprüft") == "geprüft") {
// alert ("ss");
//}
//})
if ($ ("#box"). Ist (": geprüft")) {
Alert ("DF");
}
})
</script>
</head>
<body>
<Eingabe type = "CheckBox" id = "Kontrollkästchen" checked = "checked">
</body>
</html>