Handle onclick function of html webview in android

前端 未结 1 1182
孤街浪徒
孤街浪徒 2021-01-22 08:12

I\'m trying to handled onclick of html in android.refered enter link description here but its not detecting.



        
1条回答
  •  借酒劲吻你
    2021-01-22 08:42

    The pitfalls of copying code from StackOverflow is that you might not understand it fully.

    function GreenClicked()
    {
        Green.performClick(); // Needs to be your JS Interface name
        document.getElementById("Green").value = "J'accepte";
    }
    

    The Android docs on this are great. Use them. You'll have more of an understanding of what's going on in your own code.

    0 讨论(0)
提交回复
热议问题