Struts2的form无法提交到action

救生圈 救生圈 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
之前用的很好,但是最近改了jsp之后提交到action的form就是null了,怎么回事呢 ?

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>IPDASSSS</title>
<link rel="stylesheet" type="text/css" href="themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="themes/icon.css">
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
<script>
function dosubmit() {
document.loginForm.enctype="multipart/form-data";
document.loginForm.submit();
}

</script>
</head>

<body>
<form id="loginform" name="loginForm" action="loginAction" method="post">
<div id="loginin" class="easyui-window" closable="false" draggable="false" resizable="false" title="欢迎登陆" style="width:300px;height:120px;">
登陆ID:<input name="student.id"/><br>
登陆密码:<input name="student.password"/><br>
<a class="easyui-linkbutton" iconCls="icon-ok" onclick="dosubmit()">登陆</a>
</div>
</form>
</body>
</html>

...全文

相关推荐

评论 15
收藏 已收藏
分享
返回顶部
救生圈
Web 开发 81,108 成员 341,721 内容