Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在我的应用程序中打开网页并更改网页内容?删除/添加/修改它的内容?用 Java 做类似于浏览器扩展的东西,但用应用程序完成?
在 android Webviews 中,您可以调用 javascript 函数。
webView.loadUrl("javascript:testEcho('Hello World!')");
如果网页是您的,您可以添加特定于应用程序的功能,这些功能将在 web 视图中调用。
如果您正在谈论更改任何网页的内容。我不确定,但我认为唯一的方法是在内部加载文件,进行修改并显示您更改的本地 url。