使用原生js,html,css实现表单提交功能
```html
<!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 >
</ html >
免责声明:
以上内容除特别注明外均来源于网友提问,创作工场回答,未经许可,严谨转载。