是否可以通过 WebBrowser 控件从 .NET Compact Framework 调用 JavaScript 函数?
最佳答案
它与 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()"));
关于javascript - 在 WebBrowser 控件中从 .NET Compact Framework 调用 JavaScript 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3135586/