簡體   English   中英

如何檢測jQuery是否在WinForm WebBrowser控件中導航到的文檔中?

[英]How do I detect if jQuery is in a document navigated to in the WinForm WebBrowser control?

我在C#/ Visual Studio 2008中有一個帶有IE WebBrowser控件的Windows窗體應用程序。 在DocumentCompleted事件中,我想搜索WebBrowser.Document或WebBrowser.DomDocument,以查看頁面中是否已經存在jQuery。

什么是實現此目的的好方法?

謝謝!

你試過了嗎:

bool hasjQuery = webBrowser1.Document.InvokeScript("jQuery") != null;

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM