62
rated 0 times
[
67]
[
5]
/ answers: 1 / hits: 28287
/ 9 Years ago, sun, august 23, 2015, 12:00:00
I have a webview i am using in android and I'm trying to trigger javascript on a button click. I'm trying to use the code below to change the color of the class to red. But I cant seem to get it working
final WebView wb=(WebView)findViewById(R.id.webView2);
wb.loadUrl(javascript:
+ var FunctionOne = function () {
+ try{document.getElementsByClassName('test')[0].style.color='red';}catch(e){}
+ };);
More From » android