2
我正在使用HtmlDocument和HtmlWeb。我通常通過其ID使用獲取表單元素:HtmlDocument獲取表格
HtmlDocument doc = new HtmlDocument();
//get the form
doc.LoadHtml(htmlPreviousForm);
var form = doc.GetElementbyId("postingForm");
然而,我的工作,我想沒有名稱,ID或類表單的頁面:
<form action="test.php" method="post">
<button type="submit" name="go" value="[x]" title="delete">x</button>
</form>
我如何使用HtmlDocument獲取此表單的動作?
你有很多形式存在? – hardkoded
不,只有一個表格 – user6824563
爲什麼不給表單添加名稱? –