title: Handle onclick function of html webview in android
body: <p>I'm trying to handled onclick of html in android.refered <a href="https://stackoverflow.com/questions/4065312/detect-click-on-html-button-through-javascript-in-android-webview/4075955#4075955">enter link description here</a> but its not detecting.</p>
  
  <pre><code>&lt;script language="javascript"&gt;
  
     function GreenClicked()
     {
        valid.performClick();
        document.getElementById("Green").value = "J'accepte";
     }
  &lt;/script&gt;
  </code></pre>
  
  <p>html tag inside body-</p>
  
  <pre><code> &lt;div  id="Green" onclick="GreenClicked()"&gt;Green&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
  </code></pre>
  
  <p>java code -</p>
  
  <pre><code>mGreenPassenger= new Button(getActivity());
          mGreenPassenger.setOnClickListener(this);
  
          WebSettings ws = mWebView.getSettings();
          ws.setJavaScriptEnabled(true);
          // Add the interface to record javascript events
          mWebView.addJavascriptInterface(mGreenPassenger, "Green");
  </code></pre>