<form action="" method="post" onsubmit="return checkps()">为什么不能调用这个方法呢
<%@pagelanguage="java"import="java.util.*"pageEncoding="utf-8"%><%Stringpath=request....
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
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>修改密码和头像</title>
<link rel="stylesheet" type="text/css" href="index_css/setp.css">
<script type="text/javascript">
function checkps(){
alter("asd");
}
</script>
</head>
<body>
<jsp:include page="mian_index.jsp" />
<div class="setkj">
<div class="setkjr">
<div class="setkjbt">上传头像</div>
<div id="hx2"></div>
</div>
<form action="" method="post" onsubmit="return checkps()">
<div class="setkjl">
<div class="setkjbt">修改密码</div>
<div id="hx1"></div>
<div class="setkjrr"> <input class="input1" type="password" name="old" placeholder='旧密码' > </div>
<div class="setkjll">旧密码:</div>
<div class="setkjrr"> <input class="input1" type="password" name="new" placeholder='新密码' > </div>
<div class="setkjll">新密码:</div>
<div class="setkjrr"> <input class="input1" type="password" name="ag" placeholder='再输一遍:' > </div>
<div class="setkjll">再输一遍:</div>
<div class="setkjin"><input value="提交" class="input2" type="submit"/></div>
</div>
</form>
</div>
</body>
</html> 展开
<%
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>修改密码和头像</title>
<link rel="stylesheet" type="text/css" href="index_css/setp.css">
<script type="text/javascript">
function checkps(){
alter("asd");
}
</script>
</head>
<body>
<jsp:include page="mian_index.jsp" />
<div class="setkj">
<div class="setkjr">
<div class="setkjbt">上传头像</div>
<div id="hx2"></div>
</div>
<form action="" method="post" onsubmit="return checkps()">
<div class="setkjl">
<div class="setkjbt">修改密码</div>
<div id="hx1"></div>
<div class="setkjrr"> <input class="input1" type="password" name="old" placeholder='旧密码' > </div>
<div class="setkjll">旧密码:</div>
<div class="setkjrr"> <input class="input1" type="password" name="new" placeholder='新密码' > </div>
<div class="setkjll">新密码:</div>
<div class="setkjrr"> <input class="input1" type="password" name="ag" placeholder='再输一遍:' > </div>
<div class="setkjll">再输一遍:</div>
<div class="setkjin"><input value="提交" class="input2" type="submit"/></div>
</div>
</form>
</div>
</body>
</html> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询