qcode
  • 创作工场专业版,一问多答!更智能、更完整、更原创
  • 这是一个超强内容创作平台,它会写文章、做设计、绘图、敲代码,有问必答!
🔥点击使用-免登录深度版🔥

请用原生 html、css 和 javascript 实现以下布局的表单和点击“修改”按钮进行提交的功

时间2023-04-18 14:38:40 提问来自 浙江省杭州市 的网友 分类创作 浏览582
能 <!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

不满意?免费深度重写!

免责声明:
以上内容除特别注明外均来源于网友提问,创作工场回答,未经许可,严谨转载。

上一篇 有一个多维数组,其维数不定。请写一个函数,找出该数组指定某个维度的项(注,这 下一篇 坐在火车上能写一首七言绝句吗