Heim > Artikel > Web-Frontend > 新手,新写的INPUT函数的VALUE值显示不了。_html/css_WEB-ITnose
HTML的代码是是这个:
Just type in your name (and click the Submit) to enter the contest:
Firstname:
Lastname:
<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>
checkbox 复选框的 value 属性值不会显示在用户界面中,是传后台的,你想显示
在外 前后加值
value属性内容是传递值时使用的,不能直接在界面中显示
<input type="radio" name="hotornot" value="hot" >hot</input>