关于ASP.NET调用JavaScript的实现

http://www.abc188.com/info/html/wangluobiancheng/DotNetBianCheng/20080225/43716.html

 http://blog.sina.com.cn/s/blog_5fc7de070100emew.html

 

 js调用取服务器端的值>>>>>>>>>>>>>>>>>

假设有一个Label服务器控件的ID为lblTitle。

在JS代码中,使用:document.getElementById("<%= lblTitle.ClientID %>");

如果要设置值的话,Label使用:
document.getElementById("<%= lblTitle.ClientID %>").innerHTML = "你的内容";

如果是输入框,则使用:
document.getElementById("<%= lblTitle.ClientID %>").value= "你的内容" 

相关文章:

  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
  • 2022-03-11
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
猜你喜欢
  • 2021-10-14
  • 2021-06-27
  • 2022-12-23
  • 2022-01-07
  • 2021-08-29
相关资源
相似解决方案