document.forms [0]在调试模式下没有任何元素 [英] document.forms[0] has no elements in debug mode

查看:73
本文介绍了document.forms [0]在调试模式下没有任何元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我是ASP.NET的新手,遇到这样的问题.

我有一张桌子的表格.我在其中一个图像中.我想在按钮单击事件上动态更改此设置.我有一个javascript函数可以做到这一点:

Hi,
I am new to ASP.NET and has an issue like this.

I have a form with a table. I have an image in in one of the . I want to change this dynamically on a button click event. I have a javascript function to do this:

function showGraph(url)
{
    var tdimage = document.getElementById("graphimage");//graphimage is the id of td in the table
    if(tdimage != null)
    {
        tdimage.setAttribute(src, url);
    }
}


但是,当我单击按钮并使用VS2008转到调试视图时,除__EVENTTARGET,__ EVENTARGUMENT和__VIEWSTATE之外,我的窗体中没有其他控件.我添加的表发生了什么事情?


But, when I click on the button and go to the debug view using VS2008, I don''t see any controls in my form except __EVENTTARGET, __EVENTARGUMENT and __VIEWSTATE. What happened to the table that I have added??

推荐答案

您正在查看哪个事件?

您是否尝试过
HttpContext.Current.Request.Forms["id"]

查看您已提交的表单控件.
In which event are you looking at ?

Did you tried
HttpContext.Current.Request.Forms["id"]

to see the form control that you have submitted.


这篇关于document.forms [0]在调试模式下没有任何元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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