新手求助,新写的INPUT函数的VALUE值显示不了。

hopperhuang 2016-05-11 04:06:16
HTML的代码是是这个:
<p>
Just type in your name (and click the Submit) to enter the contest:<br />
Firstname: <input type="text" name="firstname" value=""/><br />
Lastname:<input type="text" name="lastnmae"value=""/><br />
<input type="Submit" /><br/>
<input type="radio" name="hotornot" value="hot" /><br/>
<input type="radio" name="hotornot" value="not" /><br/>
<input type="checkbox" name="spice" value="salt" /><br/>
<input type="checkbox" name="spice" value="pepper" /><br/>
<input type="checkbox" name="spice" value="garlic" /><br/>
</p>

但是网页显示是这样:


请问是为什么呢??
...全文
337 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
浮沉独步 2016-05-17
  • 打赏
  • 举报
回复
value属性内容是传递值时使用的,不能直接在界面中显示
 <input type="radio" name="hotornot" value="hot" >hot</input>
ww179564174 2016-05-13
  • 打赏
  • 举报
回复
checkbox 复选框的 value 属性值不会显示在用户界面中,是传后台的,你想显示 在<input type="radio" name="hotornot" value="hot" />外 前后加值
cocotsau 2016-05-11
  • 打赏
  • 举报
回复

<p>
Just type in your name (and click the Submit) to enter the contest:<br />
Firstname: <input type="text" name="firstname" value=""/><br />
Lastname:<input type="text" name="lastnmae"value=""/><br />
<input type="Submit" /><br/>
hot<input type="radio" name="hotornot" value="hot" /><br/>
not<input type="radio" name="hotornot" value="not" /><br/>
salt<input type="checkbox" name="spice" value="salt" /><br/>
pepper<input type="checkbox" name="spice" value="pepper" /><br/>
garlic<input type="checkbox" name="spice" value="garlic" /><br/>
</p>

61,115

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧