Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹ØÓÚ¸´Ñ¡¿òµÄÑéÖ¤Óëjspȡֵ(×ªÔØ)

±íµ¥ÈçÏ£º
<form name="form1" action="test.jsp" method="post" onsubmit="return checkData();">
   <input name="checkall1" type="checkbox" value="0" onClick="checkAllBox(this);"/>ȫѡ<br>
   <input name="answer" type="checkbox" value="a"/>A<br>
   <input name="answer" type="checkbox" value="b"/>B<br>
   <input name="answer" type="checkbox" value="c"/>C<br>
   <input name="answer" type="checkbox" value="d"/>D<br>
   <input name="answer" type="checkbox" value="e"/>E<br>
   <input name="answer" type="checkbox" value="f"/>F<br>
</form>
ȫѡ¼°ÑéÖ¤javascriptÈçÏ£º
<script type="text/javascript">
function checkAllBox(obj){
 var answer= document.getElementsByName("answer");
 if(obj.checked==true){
  for(var i=0;i<answer.length;i++){
   answer[i].checked = true;
  }
 }else{
  for(var i=0;i<answer.length;i++){
   answer[i].checked = false;
  }
 }
}
function checkData(){ 
 var answer= document.getElementsByName("answer");
 var flag = false;
 for(var i=0;i<income.length;i++){
  if(income[i].checked == true){
   flag = true;
   break;
  }
 }
 if(!flag){
  alert("ÇëÖÁÉÙÑ¡ÔñÒ»Ïî");
 }
 return flag;
}
</script>
test.jspÖÐȡֵÈçÏ£º
String[] answer= request.getParameterValues("answer");//ÕâÀïֻȡµÃÁËÑ¡ÖеÄÏÈç¹ûûÓÐÑ¡ÖÐÈκÎÒ»ÏÔòΪnull
if(answer!=null){
   for(String i:answer){
      System.out.println(i);
   }
}


Ïà¹ØÎĵµ£º

jspÖÐÎÄÂÒÂëÎÊÌâ

Ò»¡¢JSPÒ³ÃæÏÔʾÂÒÂë
ÏÂÃæµÄÏÔÊ¾Ò³Ãæ(display.JSP)¾Í³öÏÖÂÒÂ룺
 
 
 
 
 
 
 
 
 
 
¶Ô²»Í¬µÄWEB·þÎñÆ÷ºÍ²»Í¬µÄJDK°æ±¾£¬´¦Àí½á¹û¾Í²»Ò»Ñù¡£Ô­Òò£º·þÎñÆ÷ʹÓõıàÂ뷽ʽ²»Í¬ºÍä¯ÀÀÆ÷¶Ô²»Í¬µÄ×Ö·ûÏÔʾ½á¹û²»Í¬¶øµ¼Öµġ£½â¾ö°ì·¨£ºÔÚJSPÒ³ÃæÖÐÖ¸¶¨±àÂë·½Ê ......

JSPÒ³Ãæ´«ÖµÖÐÎÄÂÒÂëµÄ¼òµ¥½â¾ö·½·¨

Ô´´úÂ룬a.jspÍùb.jsp´«Öµ£º
a.jspÒ³ÃæÄÚÈÝ
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<form action="b.jsp">
¡¡¡¡name:<input type=text name=name>
¡¡¡¡<input type=submit>
</form>
b.jspÒ³ÃæÄÚÈÝ£º
<%@ page language="java" import="java.ut ......

jspÖÐÈ¡µÃ·þÎñÆ÷ʱ¼ä²¢¶¯Ì¬ÏÔʾ


<%
      Calendar rightNow = Calendar.getInstance();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
String sysdate = format.format(rightNow.getTime());
int week = rightNow.get(rightNow.DAY_OF_WEEK);
String weekar ......

jspºÍActionÖÐBase64±àÂëת»»

jspÖÐÓÃjavascript½«ÖÐÎÄBase64תÂë, ActionÖÐÔÙÓÃBase64½âÂë
javascriptÖÐʹÓÃwebtoolkit.base64.js,ÏÂÔØµØÖ·http://www.webtoolkit.info/djs/webtoolkit.base64.js
Ïà¹Ø½éÉÜ http://www.webtoolkit.info/javascript-base64.html
/**
*
*  Base64 encode / decode
*  http://www.webtoolkit.info/
*
**/ ......

jspÓëSQL Server 2000 µÄÁ¬½Ó

ÖÕÓڸ㶨JSPÁ¬½ÓSQL Server 2000Êý¾Ý¿âµÄÎÊÌâÁË
2008Äê01ÔÂ29ÈÕ ÐÇÆÚ¶þ 15:54
    ǰ¼¸Ì죬ƽƽͬѧһֱÔÚ¸ãJSP Á¬½ÓSQL Server 2000Êý¾Ý¿âµÄÎÊÌ⣬һֱÁ¬²»ÉÏ£¬È»ºó½ÐÎÒÈ¥°ïËû¿´¿´£¬Æ¾×ÅÒÔǰµÄ¾­Ñ飬¸ãÁËÒ»¸öÏÂÎ磬ºÙºÙ£¡ÖÕÓÚ°ïËûÁ¬½ÓÉÏÁË£¬Ö÷Òª²½ÖèÈçÏ£º
    1¡¢ÐèÒªµÄ¶«Î÷´ó¼Ò¿ÉÒÔµ½Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ