Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.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和webbrowser控件在某人的网站中模拟选择选项?_C#_Webbrowser Control_Html Select - Fatal编程技术网

C# 如何使用c和webbrowser控件在某人的网站中模拟选择选项?

C# 如何使用c和webbrowser控件在某人的网站中模拟选择选项?,c#,webbrowser-control,html-select,C#,Webbrowser Control,Html Select,我知道如何在文本输入中设置值 document.GetElementsByTagName("input") .GetElementsByName("kwota1")[0].SetAttribute("value", "12"); 现在我想从选择中选择选项。我可以通过名字找到它,接下来我该怎么办 document.GetElementsByTagName("select").GetElementsByName("waluta1")[0] 你的问题需要进一步研究,

我知道如何在文本输入中设置值

document.GetElementsByTagName("input")
                .GetElementsByName("kwota1")[0].SetAttribute("value", "12");
现在我想从选择中选择选项。我可以通过名字找到它,接下来我该怎么办

document.GetElementsByTagName("select").GetElementsByName("waluta1")[0]

你的问题需要进一步研究,不知道你在问什么。
document.GetElementsByTagName("select").GetElementsByName("waluta1")[0].SetAttribute("selected", "true");