Home > Web Front-end > Front-end Q&A > New attributes of HTML5 form

New attributes of HTML5 form

jacklove
Release: 2018-06-11 22:32:30
Original
1807 people have browsed it

1.HTML 5 formaction attribute

Definition and usage

The formaction attribute specifies where to go when submitting a form. Send form data.

Note:

1. The formaction attribute specifies the URL of the file that handles the input control when the form is submitted.

2. The formaction attribute overrides the action attribute of the

element.

Note: The formaction attribute applies to type="submit" and type="image".

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>formaction</title>
</head>
<body>
<form id="testform">
    <input type="submit" name="s1" value="v1" formaction="http://localhost:8080/index01/Test01.jsp">提交到http://localhost:8080/index01/Test01.jsp
    <input type="submit" name="s2" value="v2" formaction="http://localhost:8080/index01/Test02.jsp">提交到http://localhost:8080/index01/Test02.jsp
    <input type="submit" name="s3" value="v3" formaction="http://localhost:8080/index01/Test03.jsp">提交到http://localhost:8080/index01/Test03.jsp
</form>
</body>
</html>
Copy after login

2.HTML 5

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template