麻烦老师看一下代码有什么问题,还有性别栏怎么实现单选?
来源:2-7 编程练习
黯丶晓
2018-12-20 18:25:04
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>date pickers</title> </head> <body> <p>姓名:<input type="text" name="text"></p> <p>性别:<input type="radio" name="man">男 <input type="radio" name="woman">女</p> <p>出生日期:<input type="date" name="date"></p> <p>出生月份:<input type="month" name="month"></p> <p>出生周数:<input type="week" name="week"></p> <input type="button" value="提交" name="button"> </body> </html
性别那里点两个两个都是选中的无法取消
1回答
1、如果想要实现性别单选,name属性值需要是一致的。
2、表单要有提交效果,需要在最外层包裹上form标签,还有提交效果的按钮要使用submit类型。
参考修改:
自己完善测试下,祝学习愉快!
相似问题