首页 >后端开发 >php教程 >php表单如何构建?

php表单如何构建?

怪我咯
怪我咯原创
2018-05-14 09:17:563901浏览

构建表单的基本要素:form标签。以form标签为创建一个表单的最基本的html标签。以

给你附一个例子

<form action="#" enctype="multipart/form-data" method="post" name="biaodan"  onsubmit="return comfirm()">
    
    <p class="bm_bt">     
     <p class="bm_bt1">姓名:<input type="text" name=&#39;names&#39; id=&#39;names&#39; class=&#39;intxt&#39; value=&#39;&#39;/>
    
       <span class="bm_s1">*请输入正确的联系方式  </span>
    
     </p>
    
     <p class="bm_bt1">电话:<input type="text" name=&#39;tels&#39; id=&#39;tels&#39; class=&#39;intxt&#39; value=&#39;&#39;/>
    
       <span class="bm_s1">*请输入正确的名字  </span>
    
     </p>
    
     <p class="bm_bt1">Q  Q:<input type="text" name=&#39;qqs&#39; id=&#39;qqs&#39; class=&#39;intxt&#39; value=&#39;&#39;/>
    
       <span class="bm_s1">请输入您的QQ号 </span>
    
     </p>
    
     <p class="bm_bt1">备注:<input type="text" name=&#39;others&#39; id=&#39;others&#39; class=&#39;intxt&#39; value=&#39;&#39;/>
    
       <span class="bm_s1">如有问题请留言</span>
    
     </p>
    
     <input type=&#39;text&#39; name=&#39;datas&#39; id=&#39;datas&#39; style=&#39;border:0 none; display:none;&#39;  class=&#39;intxt&#39; value=&#39;&#39; />
    
     <input type=&#39;text&#39; name=&#39;times&#39; id=&#39;times&#39; style=&#39;border:0 none; display:none;&#39;  class=&#39;intxt&#39; value=&#39;&#39; />
    
   </p>
    
   <p class="bm_ft">       
     <p class="bm_ft1"><input type="submit" name="submit" class=&#39;coolbg&#39; value=" "/>
    
    </p>
    
   </p>
    
   </form>

以上是php表单如何构建?的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn