![](/img/trans.png)
[英]Automatically display value in a text box based on the value entered in another text box using javascript
[英]In the DOM model/JavaScript , Is there a difference between a a text box and the value entered into it?
我知道這可能真的是個嬰兒問題。但這讓我感到困惑。 如果我正在Firebug中查看頁面(這是SSRS生成的網頁,即ReportViewer),如下所示:
因此,我想在那里獲取實際輸入框的ID,然后出現的標簽顯示_value
這是否意味着我沒有得到輸入框ID? 我將如何獲得(僅輸入文本框)?
謝謝!
該輸入的ID為MainContent_rptCompletes_ctl00_ctl03_txtValue
(由於ASP.NET Webforms)。
您可以使用TextBox.ClientID
檢索TextBox
ID
。 如果要確保TextBox
與ID
具有相同的ClientID
,則將ClientIDMode
設置為Static
。
<asp:TextBox ID="BoxID" runat="server" ClientIDMode="Static">
</asp:TextBox>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.