zoukankan      html  css  js  c++  java
  • struts1标签(html:text)

    这个标签可能是出现频率最高的标签了。

    功能:

    <html:text/>产生HTML语句:

      <input type=”text”…>

    也就是在页面上产生input类型的显示标签。

    --------------------------------------------------------------------------------

    其中比较关键的属性property:

      是要与后台交互的字段名,在struts1中需要设置对应action的form类,其中property就必须在form类中有成员对应,而且必须有get和set方法。这样才可以正常显示出来。

    属性value:设置的初始值

    scope:适用范围。默认是request。分别对应和RequestContextSessionContext区的数据.

    其余请参照struts1标签说明

    --------------------------------------------------------------------------------  

    如何在javascript里取得<html:text>里面的值

    回答:<html:text maxlength="40" property="booktitle" size="40" value="" />

    里面添加name属性 比如: name="title"
    js: document.getElementsByName("title")[0].value

  • 相关阅读:
    443. String Compression
    506. Relative Ranks
    825. Friends Of Appropriate Ages
    447. Number of Boomerangs
    54. Spiral Matrix
    744. Find Smallest Letter Greater Than Target
    HDU-1565 方格取数(1)
    zoj 3672 Gao The Sequence
    ZOJ 3675 Trim the Nails
    poj -2955 Brackets
  • 原文地址:https://www.cnblogs.com/adaonling/p/5106242.html
Copyright © 2011-2022 走看看