我想找出一个元素的 ID。我想找出文本框的 ID,因为我需要将 ID 输入到我的 VB 应用程序中(从那里我将使用 GetElementbyID 来查找元素)。我为 ID 尝试了“futPhishingTextBoxTyped”,但它不起作用..
问问题
189 次
2 回答
1
具有“futPhishingTextboxTyped”类的文本框没有分配的 ID。您需要从 FORM 父级引用它:
document.*formname*.futPhishingTextboxTyped (whatever your form name is)
输入也应该是自动关闭的:
<input class="futPhishingTextboxTyped" type="text" maxlength="15" />
于 2013-01-10T19:16:48.200 回答
0
它没有身份证。您可以尝试获取 div 然后找到它的子元素
GetElementById("futPhishingAdditional").GetElementsByTagName("input")
根据您的评论,整行可能如下所示:
WebBrowser1.Document.GetElementById("futPhishingAdditional").GetElementsByTagName("input").Item(0).SetAttribute("value", TextBox1.Text)
于 2013-01-10T19:26:33.160 回答