在同一个form里submit和reset无效
来源:2-8 基本控件(2)
慕仙7313728
2022-04-10 10:40:16
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <form action="" method="POST"> 文本输入:<input type="text"> value的值: <input type="text" value="value的值"> 提示文本内容: <input type="text" placeholder="提示的内容"> 锁定无法交互: <input type="text" disabled> 单选框: A:<input type="radio" name="a" value="A">B: <input type="radio" name="a" value="B" checked></form><br> label将文字和单选框绑定(HTML5): <label> 文字:<input type="radio" name="wenzi"> </label> <label> 有效:<input type="radio" name="wenzi"> </label> label将文字和单选框绑定(HTML4): <input type="radio" name="wenzi" id="wen"> <label for="wen">文字</label> <input type="radio" name="wenzi" id="you"> <label for="you">有效</label> 复选框checkbox: <label>上<input type="checkbox" name="fuxuan" value="上"></label> <label>下<input type="checkbox" name="fuxuan" value="下"></label> <label>左<input type="checkbox" name="fuxuan" value="左"></label> <label>右<input type="checkbox" name="fuxuan" value="右"></label> 密码框: <input type="password" name="" id=""></br> 下拉菜单: <select> <option value="0">请选择</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> <p> <h3>多行文本框:</h3> <textarea name="" id="" cols="30" rows="10"> </textarea> </p> <p> <h3>按钮</h3> <button>普通按钮</button> <input type="submit" value="提交按钮"> <input type="reset" value="重置按钮"> </p> </form> </body> </html>
2回答
同学你好,能够自己发现并解决问题,真棒,在书写代码中确实要仔细点,注意标签的正确嵌套与闭合哦,继续加油,祝学习愉快~
慕仙7313728
提问者
2022-04-10
抱歉,多写了一个form闭口
相似问题