⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 struts-html.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<td>
                JavaScript event handler executed when this element is under the
                mouse pointer and a mouse button is released.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">property</td>
<td>
                Name of the request parameter that will be included with this
                submission, set to the specified value.
            
            [Required]
          
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">size</td>
<td>
                Size of the file selection box to be displayed.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">style</td>
<td>
                <p>CSS styles to be applied to this HTML element.</p>

                <p>
<strong>N.B.</strong> If present, the <code>errorStyle</code>
                overrides this attribute in the event of an error for the element.</p>
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">styleClass</td>
<td>
                <p>CSS stylesheet class to be applied to this HTML element
                (renders a "class" attribute).</p>

                <p>
<strong>N.B.</strong> If present, the <code>errorStyleClass</code>
                overrides this attribute in the event of an error for the element.</p>
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">styleId</td>
<td>
                <p>Identifier to be assigned to this HTML element (renders
                an "id" attribute).</p>

                <p>
<strong>N.B.</strong> If present, the <code>errorStyleId</code>
                overrides this attribute in the event of an error for the element.</p>
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">tabindex</td>
<td>
                The tab order (ascending positive integers) for this element.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">title</td>
<td>
            <p>The advisory title for this element.</p>
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">titleKey</td>
<td>
            <p>The message resources key for the advisory title
            for this element.</p>
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">value</td>
<td>
            <p>
                <strong>NOTE</strong>: When setting this to some value, whether
                intentional or as the result (for example) of validation errors 
                forcing the user back to the original jsp, this value is ignored 
                by most browsers (for security reasons).
                This means that your users will have to re-select any previously
                selected files when submitting the form.  Opera web browser will
                prompt the user so they have a chance to abort the submit.
            </p>
                Value to which this field should be initialized. [Use the
                corresponding bean property value or body content (if any) if 
                property is not specified]
            
            [RT Expr]
          </td>
</tr>
</table>
</div>
<p>
<a href="#top">Back to top</a>
</p>
<h3 id="form">
<strong>form</strong> - 
            Define An Input Form
        </h3>
<div class="indent">
            <p>
                Renders an HTML &lt;form&gt; element whose contents are described
                by the body content of this tag. The form implicitly interacts
                with the specified request scope or session scope bean to populate
                the input fields with the current property values from the bean.
            </p>
            <p>
                The form bean is located, and created if necessary, based on the 
                form bean specification for the associated <code>ActionMapping</code>.
            </p>
        <table class="tag-attributes">
<thead>
<tr>
<th class="attribute">Attribute Name</th>
<th>Description</th>
</tr>
</thead>
<tr class="evenRow">
<td align="center">action</td>
<td>
                        <p>The URL to which this form will be submitted.  This
                        value is also used to select the ActionMapping we are
                        assumed to be processing, from which we can identify
                        the appropriate form bean and scope.</p>

                        <p>If you are using extension mapping for selecting the
                        controller servlet, this value should be equal to the
                        <code>path</code> attribute of the corresponding
                        <code>&lt;action&gt;</code> element, optionally
                        followed by the correct extension suffix.</p>

                        <p>If you are using path mapping to select the
                        controller servlet, this value should be exactly equal
                        to the <code>path</code> attribute of the corresponding
                        <code>&lt;action&gt;</code> element.</p>
                        
            [Required]
          
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">acceptCharset</td>
<td>
                The list of character encodings for input data that the server should
                accept.
            <p class="since">Since:  Struts 1.2.2</p>
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">disabled</td>
<td>
                Set to <code>true</code> if the Form's input fields should be
                disabled.
            <p class="since">Since:  Struts 1.2.7</p>
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">enctype</td>
<td>
                The content encoding to be used to submit this form, if the method
                is POST. This must be set to "multipart/form-data" if you are using
                the file tag to enable file upload. If not specified, the browser
                default (normally "application/x-www-form-urlencoded") is used.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">focus</td>
<td>
                The field name (among the fields on this form) to which initial
                focus will be assigned with a JavaScript function. If not specified,
                no special JavaScript for this purpose will be rendered.
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">focusIndex</td>
<td>
                If the focus field is a field array, such as a radio button group, you can 
                specify the index in the array to receive focus.
            <p class="since">Since:  Struts 1.1</p>
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">method</td>
<td>
                The HTTP method that will be used to submit this request
                (GET, POST). [POST]
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">onreset</td>
<td>
                JavaScript event handler executed if the form is reset.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">onsubmit</td>
<td>
                JavaScript event handler executed if the form is submitted.
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">readonly</td>
<td>
                Set to <code>true</code> if the Form's input fields should be
                read only.
            <p class="since">Since:  Struts 1.2.7</p>
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">scriptLanguage</td>
<td>
                The form's focus &lt;script&gt; element will not contain a language attribute
                when this is set to false.  The default is true but this property is ignored
                in XHMTL mode.
            <p class="since">Since:  Struts 1.2</p>
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">style</td>
<td>
                CSS styles to be applied to this HTML element.
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">styleClass</td>
<td>
                CSS stylesheet class to be applied to this HTML element
                (renders a "class" attribute).
            
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">styleId</td>
<td>
                Identifier to be assigned to this HTML element (renders
                an "id" attribute).
            
            [RT Expr]
          </td>
</tr>
<tr class="evenRow">
<td align="center">target</td>
<td>
                Window target to which this form is submitted, such as
                for use in framed presentations.
            
            [RT Expr]
          </td>
</tr>
</table>
</div>
<p>
<a href="#top">Back to top</a>
</p>
<h3 id="frame">
<strong>frame</strong> - Render an HTML frame element</h3>
<div class="indent">

            <p>Renders an HTML <code>&lt;frame&gt;</code> element
            with processing for the <code>src</code> attribute that is
            identical to that performed by the <code>&lt;html:link&gt;</code>
            tag for the <code>href</code> attribute.  URL rewriting will be
            applied automatically, to maintain session state in the
            absence of cookies.</p>

            <p>The base URL for this frame is calculated based on
            which of the following attributes you specify (you must
            specify exactly one of them):</p>
            <ul>
            <li>
<em>forward</em> - Use the value of this attribute as the
                name of a global <code>ActionForward</code> to be looked
                up, and use the module-relative or context-relative
                URI found there.</li>
            <li>
<em>href</em> - Use the value of this attribute unchanged.
                </li>
            <li>
<em>page</em> - Use the value of this attribute as a
                module-relative URI, and generate a server-relative
                URI by including the context path and application
                prefix.</li>
            <li>
<em>action</em> - Use the value of this attribute as the
                logical name of a global Action that contains the actual 
                content-relative URI of the destination of this transfer.</li>
            </ul>

            <p>Normally, the hyperlink you specify with one of the
            attributes described in the previous paragraph will be left
            unchanged (other than URL rewriting if necessary).  However,
            there are two ways you can append one or more dynamically
            defined query parameters to the hyperlink -- specify a single
            parameter with the <code>paramId</code> attribute (and its
            associated attributes to select the value), or specify the
            <code>name</code> (and optional <code>property</code>)
            attributes to select a <code>java.util.Map</code> bean that
            contains one or more parameter ids and corresponding values.
            </p>

            <p>To specify a single parameter, use the <code>paramId</code>
            attribute to define the name of the request parameter to be
            submitted.  To specify the corresponding value, use one of the
            following approaches:</p>
            <ul>
            <li>
<em>Specify only the <code>paramName</code> attribute</em>
                - The named JSP bean (optionally scoped by the value of the
                <code>paramScope</code> attribute) must identify a value
                that can be converted to a String.</li>
            <li>
<em>Specify both the <code>paramName</code> and
                <code>paramProperty</code> attributes</em> - The specified
                property getter method will be called on the JSP bean
                identified by the <code>paramName</code> (and optional
                <code>paramScope</code>) attributes, in order to select
                a value that can be converted to a String.</li>
            </ul>

            <p>If you prefer to specify a <code>java.util.Map</code> that
            contains all of the request parameters to be added to the
            hyperlink, use one of the following techniques:</p>
            <ul>
            <li>
<em>Specify only the <code>name</code> attribute</em> -
                The named JSP bean (optionally scoped by the value of
                the <code>scope</code> attribute) must identify a
                <code>java.util.Map</code> containing the parameters.</li>
            <li>
<em>Specify both <code>name</code> and
                <code>property</code> attributes</em> - The specified
                property getter method will be called on the bean
                identified by the <code>name</code> (and optional
                <code>scope</code>) attributes, in order to return the
                <code>java.util.Map</code> containing the parameters.</li>
            </ul>

            <p>As the <code>Map</code> is processed, the keys are assumed
            to be the names of query parameters to be appended to the
            hyperlink.  The value associated with each key must be either
            a String or a String array representing the parameter value(s),
            or an object whose toString() method will be called.
            If a String array is specified, more than one value for the
            same query parameter name will be created.</p>

            <p>Additionally, you can request that the current transaction
            control token, if any, be included in the generated hyperlink
            by setting the <code>transaction</code> attribute to
            <code>true</code>.
            You can also request that an anchor ("#xxx") be added to the
            end of the URL that is created by any of the above mechanisms,
            by using the <code>anchor</code> attribute.</p>

         <table class="tag-attributes">
<thead>
<tr>
<th class="attribute">Attribute Name</th>
<th>Description</th>
</tr>
</thead>
<tr class="evenRow">
<td align="center">bundle</td>
<td>
                    The servlet context attributes key for the MessageResources
                    instance to use.  If not specified, defaults to the
                    application resources configured for our action servlet.
                <p class="since">Since:  Struts 1.2.5</p>
            [RT Expr]
          </td>
</tr>
<tr class="oddRow">
<td align="center">action</td>
<td>
               <p>Logical name of a global <code>Action</code> that
               contains the actual content-relative URI of the destination
               of this transfer.  This hyperlink may be dynamically
               modified by the inclusion of query parameters, as described
               in the tag description.  You <strong>must</strong> specify
               exactly one of the <code>action</code> attribute, the
               <code>forward</code> attribute, the
               <code>href</code> attribute,
               or the <code>page</code> attribute.</p>
          

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -