Heim  >  Artikel  >  Web-Frontend  >  新手,新写的INPUT函数的VALUE值显示不了。_html/css_WEB-ITnose

新手,新写的INPUT函数的VALUE值显示不了。_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 08:47:552169Durchsuche

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>

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn