2012-04-03 6 views
1

WebBrowser winformアプリケーションとメニューストリップを作成しました。 私はここでWinフォームのメニューストリップからHTML viewr(Webブラウザー)の内側にwin form WebBrowserメニュー

をjavascriptのボタンを使用したいが、私のWebアプリケーションメニューで

<a href="javascript:findPatient('ID');" class="navitem">Patient ID</a> 

どのように私はこのHREF = "javascriptのためにクリックイベントを作成します:findPatient( 'ID'); "私はまた私を助けてくださいどのように私は 、このためにクリックイベントを作成して自分のWebアプリケーション

<input type='checkbox' name='cb_top' onclick='toggleFrame(1)' checked /> 

であるwhic onclickの必要 いくつかの時間が、ここで感謝

答えて

0

は方法論である、あなたがあるように見えますあなたの状況にそれを微調整するのに十分なコーダー:

Private Function ClickSubmitButton() 

     Dim theButton As HtmlElement 

     Try 

      ' Link the ID from the web form to the Button var 
      theButton = webbrowser1.Document.GetElementById("loginbutton") 

      ' Now do the actual click. 
      theButton.InvokeMember("click") 
      Return True 

     Catch ex As Exception 

      Return False 

     End Try 

    End Function 
+1

ジェレミートンプソンあなたの再生に感謝 –