【发布时间】:2021-04-14 20:42:22
【问题描述】:
我想在 C# webview 中启用 Javascript。但我做不到。
它给出“Javascript 错误”。
请帮忙。
请找出下面的错误。
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
webBrowser2.Navigate("https://www.google.com/");
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
}
}
}```
【问题讨论】:
-
是时候转移到 WebView2 组件了:docs.microsoft.com/en-US/microsoft-edge/webview2
标签: javascript c# c#-4.0 c#-3.0 c#-2.0