请用原生 html、css 和 javascript 实现以下布局的表单和点击“修改”按钮进行提交的功
能
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表单实现</title>
<style type="text/css">
#container {width: 500px; margin: 0 auto;}
.form-item {margin-bottom: 10px;}
.label {display: inline-block; width: 80px; text-align: right;}
.input {width: 300px;}
</style>
</head>
<body>
<div id="container">
<!-- 表单 -->
<form action="" method="post" onsubmit="return checkForm()"> <!-- 提交时进行校验 -->
<!-- 姓名 -->
<div class="form-item">
<span class="label">姓名:</span><input type="text" name="" id="" class="input"/> <!-- 输入框 -->
</div>
<!-- 性别 -->
<div class= "form-item" > <!-- 单选框组 -->
<span class= "label" > 性别: </span > <!-- label文字说明 -->
男:<input type = "radio" name = "sex" value = "1"/> <!-- 单选框1-->
女:<input type = "radio" name = "sex" value = "2"/> <!-- 单选框2-->
</div >
// 籍贯 // 民族 // 爱好 // 头像 // 提交按钮 // 籍贯
< div class=“ form - item ” >
< span class=“ label ” > 籍贯: </ span >< input type=“ text ” name=“ ” id=“ ” class=“ input ”/>
</ div >
// 民族
< div class=“ form - item ” >
< span class=“ label ” > 民族: </ span >< input type=“ text ” name=“ ” id=“ ”class =‘ input '/>>
</ div >
// 爱好
< divclass ='form - item '>
< spanclass='label '>爱好:</span><inputtype='text'name=' 'id=' 'class='input'/>
</div>
// 头像 */}/* */ /* * / * * / * * / * * / /* */ /* */ /* */ /* */ /* */ /* */ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/**/**/**/**/**/**/**/*/*/*/*/*/*/*/*/*/*/.form - item{margin - bottom : 10 px ;}. label{display : inline - block ; width : 80 px ; text - align : right ;}. input{width : 300 px ;}#container{width : 500 px ; margin : 0 auto ;}*/#container{width : 500 px ; margin : 0 auto ;}#container{width : 500 px ; margin : 0 auto }. form - item {margin - bottom 10px}. label {display inlineblock width 80px textalignright }. input {width 300px }. formitem . label displayinlineblock width80pxtextalignright . input width300px # container width500pmmargin0auto onsubmit returncheckForm() action methodpost submit修改button修改button头像img src alt头像nameidclassinput民旷nameidclassinput爱好nameidclassinpul性别男radionamevalue女radionamevalue姓名namelasslput
免责声明:
以上内容除特别注明外均来源于网友提问,创作工场回答,未经许可,严谨转载。