如何使用JavaScript在Listview中找到子控件ID? [英] How do I find a child control id in a Listview using javascript?

查看:74
本文介绍了如何使用JavaScript在Listview中找到子控件ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

i am using javascript to get the child control id from a listview but not able to get it. please help me...

in the listview i placed a imagecontrol so i need to get that control id using javascript...

<pre lang="Javascript"> <script type="text/javascript" >       
        function wdt() {
            var wh;
            wh = document.getElementById("<% = TextBox3.ClientID %>").value;
            document.getElementById("<% = (lvPhotos).FindControl(ImageButton1).ClientID %>").width = wh;                      
        }
    </script>

推荐答案



我建议您使用jQuery 选择器 [ http://bit.ly/GKgcOp [
Hi,

I suggest you to use jQuery Selectors[^] for that. You have many examples on net. Search for http://bit.ly/GKgcOp[^] or similar to get better results and from examples you will find solution.

If you can''t solve it, just update your question with html that is generated from your asp.NET (only the part of html related to this problem, not whole html) code and I''ll try to write selector for you. :)


这篇关于如何使用JavaScript在Listview中找到子控件ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆