复制代码代码如下:
<%@ page idioma = "java" import = "java.util.*" PageEncoding = "UTF-8"%>
<%
String ruta = request.getContextPath ();
String basepath = request.getScheme ()+": //"+request.getServerName ()+":"+request.getServerPort ()+ruta+"/";
%>
<! Doctype html público "-// w3c // dtd html 4.01 transitional // en">
<html>
<Evista>
<base href = "<%= basepath%>">
<title> my jsp 'checkbox.jsp' página inicial </title>
<meta http-equiv = "pragma" content = "no-cache">
<meta http-oquiv = "cache-control" content = "no-cache">
<meta http-oquiv = "expires" content = "0">
<meta http-equiv = "Keywords" content = "Keyword1, Keyword2, Keyword3">
<meta http-oquiv = "descripción" content = "esta es mi página">
<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 ("checked") == "marcado") {
// alerta ("ss");
//}
//})
if ($ ("#box"). is (": checked")) {
alerta ("df");
}
})
</script>
</ablo>
<Body>
<input type = "checkbox" id = "box" checked = "checked">
</body>
</html>