如何在ASP.NET中的树节点的click事件上调用javascript [英] How to call javascript on the click event of a tree node in asp .net
本文介绍了如何在ASP.NET中的树节点的click事件上调用javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在树节点的click事件上使用回调.
请帮忙.
预先感谢.
I wanted to use callback on the click event of the tree node.
Please help.
Thanks in advance.
推荐答案
<script type="text/javascript">
function alertVal() {
alert("Hai");
}
</script>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
TreeView1.Attributes.Add("onclick", "alertVal()");
}
</script>
嗨
以下链接将帮助您
http://forums.asp.net/p/1353925/2771697.aspx [ ^ ]
祝你好运
快乐编码
hi
following link will help u
http://forums.asp.net/p/1353925/2771697.aspx[^]
best Luck
happy Coding
这篇关于如何在ASP.NET中的树节点的click事件上调用javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文