zoukankan      html  css  js  c++  java
  • form标签输出表单

        表单标签是Struts2标签库的核心用于输入数据、提交数据。form标签通常用于生成HTML里的<form>标签。

        <struts:form>标签不仅生成<form>标记,还会生成<table>标记。<struts:label>、<struts:textfield>、<struts:textarea>等UI标签也会生成<tr><td>标记。因此JSP中不需要书写任何布局代码。

    1 <struts:form action="addBook" validate="true">                       <!-- Form标签,启用验证 -->
    2     <struts:label value="form 标签"></struts:label>                   <!-- 文字标签 -->
    3     <struts:textfield name="name" label="书名"></struts:textfield>    <!-- 文本域标签 -->
    4     <struts:textfield name="author" label="作者"></struts:textfield>  
    5     <struts:textfield name="publishedDate" label="出版日期"></struts:textfield>
    6     <struts:submit value=" 提 交 " align="center"></struts:submit>     <!-- 提交按钮 -->
    7 </struts:form>
  • 相关阅读:
    go 错误处理策略
    git merge
    oracle
    使用PHPExcel导入数据库,date数据的问题
    PhpWord使用
    ThinkPHP
    Memcache
    没用过docker就out了
    TCP三次挥手四次协议
    数据分析
  • 原文地址:https://www.cnblogs.com/Nickzerui/p/4623028.html
Copyright © 2011-2022 走看看