高端响应式模板免费下载

响应式网页设计、开放源代码、永久使用、不限域名、不限使用次数

什么是响应式网页设计?

网页设计中表单的提交(合集)2篇

2024年网页设计中表单的提交 篇1

在Web开发中我们有时需要避免表单重复提交情况,比如发生在页面刷新等,如果不能很好解决,可能产生大问题,如网购订单提交。

解决方案一:在中件加入一个jsp,该jsp不提供显示,而只是对请求转发功能。

表单 index.jsp

<%@ page language="java" import="java.util.*"

pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML

4.01 Transitional//EN">

<html>

<head>

<title>index.jsp</title>

<meta http-equiv="pragma" content="no-cache">

<meta http-equiv="cache-control" content="no-cache">

<meta http-equiv="expires" content="0">

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

<meta http-equiv="description" content="This is my page">

</head>

<body>

<form action="mid.jsp" method="post">

用户名:<input type="text" name="name"/>

密码:<input type="password" name="password"/>

<input type="submit" value="login"/>

</form>

</body>

</html>

将请求转发 mid.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%response.sendRedirect("success.jsp");%>

表单提交成功,跳转页面success.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>success.jsp</title>

<meta http-equiv="pragma" content="no-cache">

<meta http-equiv="cache-control" content="no-cache">

<meta http-equiv="expires" content="0">

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

<meta http-equiv="description" content="This is my page">

</head>

<body>

<h1>Sucesss!!</h1><br>

</body>

</html>

2024年网页设计中表单的提交 篇2

如果你是使用的表单大师来设置的提交逻辑及跳转的话,执行的是逻辑跳转,你设置的是题目,比如你设计的表单1-10是测试题目,第一题选 A的人跳转到第二题,选B的人跳到第三题,这个就是逻辑跳转。填写者填写完你设计的表单的信息后再点击提交,这个提交你设置的是提交后跳转至网页或者提交后显示“提交成功“的信息才是最后的提交跳转功能。

猜你喜欢