当我自动单击链接时,它将在资源管理器中打开。我想打开webbrowser控件上的链接。谢谢。
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<a onclick="SetTarget('deneme');" id="rptProjeler_ctl01_rptKullanicilar_ctl00_LinkButton1"
title="deneme-12345678912"
href="javascript:__doPostBack('rptProjeler$ctl01$rptKullanicilar$ctl00$LinkButton1','')">
12345678912</a>
For Each elem1 As HtmlElement In WebBrowser1.Document.GetElementsByTagName("a")
If elem1.GetAttribute("id") = "rptProjeModal_ctl01_rptDiger_ctl00_LinkButton1" Then
elem1.Focus()
elem1.SetAttribute("target", "_self")
elem1.InvokeMember("click")
Exit For
End If
Next
当我自动单击链接时,它将在资源管理器中打开。我想打开webbrowser控件上的链接。谢谢。