Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在C中更改输入标记的属性_C#_Html_Tags_Webbrowser Control - Fatal编程技术网

C# 如何在C中更改输入标记的属性

C# 如何在C中更改输入标记的属性,c#,html,tags,webbrowser-control,C#,Html,Tags,Webbrowser Control,我是USICWeb浏览器控件。 输入标签如下所示: input id="txtText" class=" ImageAttached" type="text" style="width:100px;" name="txtText" image_attached="true" 如何更改附加到false的图像_ 我正在使用以下代码,但图像仍然附加 elements = webBrowser1.Document.GetElementById("txtText"); if (el

我是USICWeb浏览器控件。 输入标签如下所示:

input id="txtText" class=" ImageAttached" type="text" style="width:100px;" name="txtText"  image_attached="true"
如何更改附加到false的图像_

我正在使用以下代码,但图像仍然附加

  elements = webBrowser1.Document.GetElementById("txtText");
        if (elements != null)
             {                     
                 elements.SetAttribute("image_attached", "false");
              }

尝试使用调试器在赋值上设置一个断点,跳过它,查看是否调用了SetAttribute方法。如果该语句始终没有到达,那么您上面的作业就有问题。

这很模糊。您说输入标记如下:,句子的其余部分在哪里?