Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/376.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在C#webview中启用javascript_Javascript_C#_C# 4.0_C# 3.0_C# 2.0 - Fatal编程技术网

在C#webview中启用javascript

在C#webview中启用javascript,javascript,c#,c#-4.0,c#-3.0,c#-2.0,Javascript,C#,C# 4.0,C# 3.0,C# 2.0,我想在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

我想在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)
        {
           
        }
    }
}```

您可以使用geckofx,它比webview更好: 64位:
32位:

是时候移动到WebView2组件了: