The Javascript script does not execute after calling the loadUrl of WebView to load the page

 After calling the loadUrl of WebView to load the page, the Javascript script is normal (the link pointed to by location.href can be jumped). After clicking the link, the URL is analyzed in the shouldOverrideUrlLoading method of WebViewClient, and a new Activity is opened to process the information contained in the URL, and the new Activity is closed again. Return to the Activity where the WebView is located, and the Javascript script will not be executed (the link pointed to by location.href will not jump).

Solution:
  Call WebView's onResume and onPause methods in the Activity's onResume and onPause event methods, respectively.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325955744&siteId=291194637