<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> <br>String path = request.getContextPath(); <br>String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; <br>%> <br><br> <br> <br> <br><base href="<%=basePath%>"> <br><br><title>My JSP 'checkbox.jsp' starting page</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="This is my page"> <br><script type="text/javascript" src="<%=request.getContextPath()%20%>/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")=="checked") { <BR>// alert("ss"); <BR>// } <BR>//}) <br><br>if ($("#box").is(":checked")) { <BR>alert("df"); <BR>} <br><br>}) <BR></script> <br> <br><br> <br><input type="checkbox" id="box" checked> <br> <br> <br> </div>