2010-06-28 58 views

回答

4

它適用於Navigate()方法。我只是用Windows Mobile 5.0 Pocket PC Emulator試了一下。

例如:

webBrowser1.DocumentText = @"<html><head> 
      <script type='text/javascript'> 
       function doIt() { 
        alert('hello again'); 
        return 'i did it!'; 
       } 
      </script> 
      </head><body>hello!</body></html>"; 
webBrowser1.Navigate(new Uri("javascript:doIt()")); 
相關問題