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

avatar yukari06
@yukari06

137 Kontribusi 66 Poin

Diperbarui 3 tahun yang lalu

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>-&nbsp;<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>-&nbsp;<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>

avatar ahanafi
@ahanafi

815 Kontribusi 554 Poin

Dipost 3 tahun yang lalu

Tanggapan

makasi,,, pake referensi yang ke 2,,, ku copas semua XD

sama-sama, senang bisa membantu

<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="{&quot;contentType&quot;:&quot;image&quot;,&quot;height&quot;:50,&quot;url&quot;:&quot;https://www.gravatar.com/avatar/3201bd1657bc8543d867d40451065b65?d=monsterid&quot;,&quot;width&quot;: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>&nbsp;728 Kontribusi&nbsp; 472 Poin</div><div>Dipost: 43 menit yang lalu</div><div><figure data-trix-attachment="{&quot;contentType&quot;:&quot;image&quot;,&quot;url&quot;:&quot;https://sekolahkoding.com/img/icons/love.png&quot;,&quot;width&quot;: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>

avatar Rofy27
@Rofy27

1 Kontribusi 0 Poin

Dipost 3 tahun yang lalu

Login untuk ikut Jawaban