Postingan lainnya
Kelas Premium!
Belajar Javascript untuk website
Gunakan kupon "mulaijs" untuk diskon 75 ribu!
cara izinkan js di webview android studio
jadi aku cari di youtube, cara ubah web ke android,, dan ada tutorial menggunakan
WebView,,, namun saat di run, js nya ga jalan,,,, musti bagaimana/di tambah apa dan di mana ? ?
youtubnya : https://www.youtube.com/watch?v=2cWbepS1NZM
2 Jawaban:
Jawaban Terpilih
<div>Coba seperti ini :</div><pre>WebView myWebView = (WebView) findViewById(R.id.webview); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true);</pre><div><br>Referensi dapat diakses via link berikut ini :<br>- <a href="https://stackoverflow.com/questions/8846077/how-to-enable-javascript-into-webview">https://stackoverflow.com/questions/8846077/how-to-enable-javascript-into-webview</a><br>- <a href="https://stackoverflow.com/questions/7548172/javascript-not-working-in-android-webview">https://stackoverflow.com/questions/7548172/javascript-not-working-in-android-webview</a><br><br>Semoga berhasil.</div>
<pre>WebView myWebView = (WebView) findViewById(R.id.webview); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true);</pre><div><br>Referensi dapat diakses via link berikut ini :<br>- <a href="https://stackoverflow.com/questions/8846077/how-to-enable-javascript-into-webview">https://stackoverflow.com/questions/8846077/how-to-enable-javascript-into-webview</a><br>- <a href="https://stackoverflow.com/questions/7548172/javascript-not-working-in-android-webview">https://stackoverflow.com/questions/7548172/javascript-not-working-in-android-webview</a><br><br>Semoga berhasil.</div><div><figure data-trix-attachment="{"contentType":"image","height":50,"url":"https://www.gravatar.com/avatar/3201bd1657bc8543d867d40451065b65?d=monsterid","width":50}" data-trix-content-type="image" class="attachment attachment--preview"><img src="https://www.gravatar.com/avatar/3201bd1657bc8543d867d40451065b65?d=monsterid" width="50" height="50"><figcaption class="attachment__caption"></figcaption></figure></div><div><a href="https://sekolahkoding.com/user/ahanafi">@ahanafi</a></div><div> 728 Kontribusi 472 Poin</div><div>Dipost: 43 menit yang lalu</div><div><figure data-trix-attachment="{"contentType":"image","url":"https://sekolahkoding.com/img/icons/love.png","width":18}" data-trix-content-type="image" class="attachment attachment--preview"><img src="https://sekolahkoding.com/img/icons/love.png" width="50" height="50"><figcaption class="attachment__caption"></figcaption></figure><a href="https://sekolahkoding.com/forum/cara-izinkan-js-di-webview-android-studio-1632885674#"> 0</a></div><div><br></div><div>Balas</div><div><br></div><div><a href="https://sekolahkoding.com/forum/cara-izinkan-js-di-webview-android-studio-1632885674#">Jawab 👆<br></a><br></div><div>Jawaban Kamu</div><div><br></div>