posts - 89, comments - 241, trackbacks - 0, articles - 1
             :: 首頁 ::  :: 聯(lián)系 :: 聚合  :: 管理

          JSP---request方法

          Posted on 2009-02-26 14:31 saobaolu 閱讀(649) 評論(0)  編輯  收藏 所屬分類: javaweb
           1<form name = "form1" method = "post" action = "doit.jsp">
           2//所有的表單程序必須寫在form表單里
           3<input type = "checkbox" name = "color" value = "color"紅色>
           4<input type = "checkbox" name = "color" value = "green"綠色>
           5<input type = "checkbox" name = "color" value = "yellow"黃色>
           6</form>
           7
           8
           9
          10doit.jsp
          11<%@ page contentType = "text/html";Charset = GBK; %>
          12<%
          13String color[] = request.getParameterValues("color");
          14for(int i = 0;i<=color.length-1;i++){
          15out.println("color"+color[i]+" ");
          16}

          17%>
          18//request.getParameterValues("color")需要用數(shù)組來接收  


          沒有所謂的命運(yùn),只有不同的選擇!
          主站蜘蛛池模板: 灵山县| 彩票| 霍邱县| 手游| 保康县| 平谷区| 六枝特区| 新蔡县| 稻城县| 科技| 城步| 天台县| 枣阳市| 鄢陵县| 商河县| 漳浦县| 古交市| 龙海市| 长春市| 屏东县| 南充市| 新干县| 临汾市| 达尔| 衡阳县| 阿勒泰市| 独山县| 扶余县| 始兴县| 福建省| 洛扎县| 平度市| 观塘区| 固始县| 阿巴嘎旗| 阳新县| 天门市| 陆良县| 客服| 安泽县| 额尔古纳市|