【问题标题】:change asp:button to input button将 asp:button 更改为输入按钮
【发布时间】:2013-03-12 22:39:21
【问题描述】:

正在使用 asp: 按钮,但必须切换到

<input id="SubmitComments" type="button"

在屏幕上添加文本到 btn 的属性是什么。类似于 asp:button 的“文本”属性

另外:我可以使用什么来代替 TextMode="MultiLine" rows=5? 塔

【问题讨论】:

  • 两个不同的问题。

标签: asp.net html


【解决方案1】:

您可以在 Html 中使用按钮作为

<input type="button" value="Click Here" />      // value= Text to show

提交按钮

<input type="submit" value="Click Here to Submit" />

多行文本框

<textarea rows="10" cols="25" />   // can define rows and columns

【讨论】:

    【解决方案2】:

    对按钮的文本使用value='your text' 属性。

    <input id='SubmitComments' name='SubmitComments' type='button' value='your text'/>
    

    至于多行,我假设这是一个文本框。按钮听不到多行声音。

    使用textarea 元素进行多行文本输入。

    <textarea id='yourTextBoxName' name='yourTextBoxName' rows='5' />
    

    【讨论】:

      【解决方案3】:
      <input type="submit" value="Submit">
      

      使用Value 属性将文本添加到您的输入类型按钮

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-03-24
        • 2012-09-12
        • 2017-12-29
        • 1970-01-01
        相关资源
        最近更新 更多