request.getParameter的问题 为什么取不到
rex0y 2002-11-27 01:35:43 1 HTML
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>发送邮件</title>
<script language="javascript">
function addattach(){
form1.action="test.jsp";
alert(form1.opflag.value);
form1.submit();
}
//-->
</script>
</head>
<body>
<form name="form1" method="post" action="" enctype="text/plain">
<table width="70%" border="1">
<tr>
<td><font size="1"> </font></td>
<td colspan="2"><font size="1">
<input name="addAttach" type="button" id="addAttach" onClick="addattach()" value="添加" />
</font></td>
</tr>
</tr>
</table>
</form>
</body>
</html>
2 JSP
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%
String str=request.getParameter("opflag");
out.println(str+"234324");
%>
3 RESULT
结果是 null234324
我以前也用过request.getParameter好多次啊 why why