【问题标题】:Update content in WebView on loading start in runtime在运行时加载开始时更新 WebView 中的内容
【发布时间】:2019-10-24 13:32:55
【问题描述】:

加载开始后,我需要在 webview 上添加相同的内容。例如,如果我有网页:

<head>
</head>
<body>
</body>

我需要得到

<same content/>
<head>
<head>
<body>
</body>

但是&lt;same content/&gt;必须在&lt;head&gt;之前加载 你有什么想法吗?

【问题讨论】:

    标签: android android-webview android-webview-javascript


    【解决方案1】:

    可以通过覆盖方法loadDataloadDataWithBaseURL实现

    【讨论】:

      猜你喜欢
      • 2021-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-26
      • 2019-09-02
      相关资源
      最近更新 更多