<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" Title="Untitled Page" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 
<script type="text/javascript"> 
function GetValue() 
{ 
<SPAN style="COLOR: #0080c0"><STRONG>document.write('<%= TextBox1.ClientID %>')</STRONG></SPAN> 
} 
</script> 
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
<input type="button" runat="server"  /> 
</asp:Content> 
页面显示了<SPAN style="COLOR: #0080c0"><STRONG>ctl00_ContentPlaceHolder1_TextBox1</STRONG></SPAN>。即TextBox1.ClientID =ctl00_ContentPlaceHolder1_TextBox1。 

  

相关文章:

  • 2022-02-28
  • 2021-07-15
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-25
  • 2021-09-26
  • 2021-09-05
相关资源
相似解决方案