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>
相關文章
相關標籤/搜索