原始问题:
使用原生js,html,css实现表单提交功能
<!DOCTYPE html>
<html>
<head>
<title>表单提交</title>
<style type="text/css">
.form-item { margin-bottom: 20px; }
</style>
</head>
<body>
<!-- 表单 -->
<form action="http://www.example.com" method="POST">
<!-- 用户名 -->
<div class="form-item">
用户名:<input type="text" name="username" />
</div>
<!-- 密码 -->
<div class="form-item">
密码:<input type="password" name="password" />
</div>
<!-- 提交按钮 -->
<input type = "submit" value = "提交"/>
</ form >
</ body >
Prev:为了了解大学生在蜜雪冰城消费的行为,我们进行了一项调研