<div class="codetitle"> <span><a style="CURSOR: pointer" data="54293" class="copybut" id="copybut54293" onclick="doCopy('code54293')"><u>复제대码</u></a></span> 代码如下:</div> <div class="codebody" id="code54293"> <br><%@ 페이지 언어="java" import="java. util.*" pageEncoding="UTF-8"%> <br><% <BR>문자열 경로 = request.getContextPath(); <BR>String basePath = request.getScheme() "://" request.getServerName() ":" request.getServerPort() 경로 "/"; <BR>%> <br><br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <br><html> <br><머리> <br><base href="<%=basePath%>"> <br><br><title>내 JSP 'checkbox.jsp' 시작 페이지</title> <br><br><meta http-equiv="pragma" content="no-cache"> <br><meta http-equiv="cache-control" content="no-cache"> <br><meta http-equiv="expires" content="0"> <br><meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <br><meta http-equiv="description" content="내 페이지입니다"> <br><script type="text/javascript" src="<%=request.getContextPath() %>/jquery/jquery-1.7.min.js"></script> <br><!-- <BR><link rel="stylesheet" type="text/css" href="styles.css"> <br>--> <br><script type="text/javascript"> <br>$(function(){ <br><br>//$("#box").click(function(){ <br>// if ($("#box").attr("checked ")=="체크됨") { <br>// 경고("ss"); <br>// } <br>//}) <br><br>if ($("#box"). is(":checked")) { <br>alert("df") <br>} <br><br>}) <br></script> <br></head> <br><br><본문> <br><input type="checkbox" id="box" check="checked"> <br></body> <br></html> <br> </div>