private async void button1_Click(object sender, EventArgs e) { var response = await browser.EvaluateScriptAsync("document.title"); if (response.Success) MessageBox.Show(response.Result?.ToString()); response = await browser.EvaluateScriptAsync("function add(a,b){ return a + b; }"); response = await browser.EvaluateScriptAsync("add(2,3)"); if (response.Success) MessageBox.Show(response.Result?.ToString()); }
标签:返回,cefsharp,await,EvaluateScriptAsync,MessageBox,js,response,browser From: https://www.cnblogs.com/nanfei/p/17762974.html