原始问题:
使用原生js,html,css实现表单提交的逻辑
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Form Submit</title>
<!-- css -->
<style type="text/css">
#form {width: 500px;}
#form label {display: block; margin-bottom: 10px;}
#form input {margin-bottom: 10px; padding: 5px 10px; width: 100%;}
#form button {padding: 5px 10px; width: 100%;}
</style>
</head>
<body>
<!-- html -->
<div id="form">
<!-- form start -->
<form action="http://www.example.com/submit" method="post">
<!-- name field -->
<label for="name">Name</label> <!-- label for name field-->
<input type="text" name="name" id="name" /> <!-- text field-->
<br/>
<!-- email field -->
<label for="email">Email</label> <!-- label for email field-->
<input type="email" name="email" id=“email” /> <!-- email field-->
<br/>
<!-- submit button -->
Prev:电竞论文5000字