from表单如果未指定action,submit提交时候会执行当前url

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <% out.println("@:"+request.getParameter("test")+"<br>"); %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form>
<input name="test"/>
<input type="submit" value="提交">
</form>
</body>
</html>

 

posted @ 2016-10-18 11:17  流星焱雨  阅读(1531)  评论(0编辑  收藏  举报