复制代码代码如下:
<%@ halaman bahasa = "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 transisi // en">
<Html>
<head>
<base href = "<%= Basepath%>">
<Title> jsp 'checkbox.jsp' halaman awal </iteme>
<meta http-equiv = "pragma" konten = "no-cache">
<meta http-equiv = "cache-control" content = "no-cache">
<meta http-equiv = "kedaluwarsa" konten = "0">
<meta http-equiv = "kata kunci" content = "kata kunci1, kata kunci2, kata kunci3">
<meta http-equiv = "description" content = "This is my Page">
<type script = "Text/JavaScript" src = "< %= request.getContextPath () %>/jQuery/jQuery-1.7.min.js"> </script>
<!-
<tautan rel = "stylesheet" type = "text/css" href = "styles.css">
->
<type skrip = "Teks/JavaScript">
$ (function () {
// $ ("#box"). Klik (function () {
// if ($ ("#box"). attr ("checked") == "checked") {
// peringatan ("ss");
//}
//})
if ($ ("#box"). is (": checked")) {
alert ("df");
}
})
</script>
</head>
<body>
<input type = "centang kotak" id = "box" checked = "checked">
</body>
</html>