当前位置: 代码迷 >> Java Web开发 >> 为什么小弟我取到的textarea值为空啊
  详细解决方案

为什么小弟我取到的textarea值为空啊

热度:33   发布时间:2016-04-13 22:43:36.0
为什么我取到的textarea值为空啊!急急急

//JSP代码如下
<form action="<%=path %>/GetAddUpAction?key=getGywm&method=Add" method="post" id="myform" name="myform" enctype="multipart/form-data">
                    <table class="insert-tab" width="100%">
                        <tbody>
                            <tr>
                                <th>内容:</th>
                                <td> <textarea id="TextArea1" cols="20" rows="2" name="textarea" class="ckeditor"></textarea></td>
                            </tr>
                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                    <input class="btn btn6" onClick="history.go(-1)" value="返回" type="button">
                                </td>
                            </tr>
                        </tbody>
                     </table>
                </form>

else if (method.equals("Add")) {
try {
String about = req.getParameter("textarea");
System.out.println(about);

取到的值是空值  Why ? 
------解决思路----------------------
去掉:enctype="multipart/form-data";
  相关解决方案