我HAVA調用的WebView setJavaScripEnable(真),但仍哈瓦沒有效果的Android的WebView調用JavaScript
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webView = (WebView) findViewById(R.id.webview);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("https://ticket-account.pia.jp/pia/digipoke/list.do");
webView.setWebViewClient(new WebViewClient(){
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
view.loadUrl("javascript:document.getElementsByName('login_id')[0].value='qqq'");
}
});
}
檢查我的更新ANS –
你好,請檢查我的答案。 –