cordova/phonegap onclick doesn't work
<p>I try to create button which starts an alert after a click event. Something like that : </p>

<pre><code>    &lt;body&gt;
    &lt;div class="app"&gt;
        &lt;h1&gt;Apache Cordova&lt;/h1&gt;
        &lt;div id="deviceready" class="blink"&gt;
            &lt;p class="event listening"&gt;Connecting to Device&lt;/p&gt;
            &lt;p class="event received"&gt;Device is Ready&lt;/p&gt;

        &lt;/div&gt;
        &lt;button onclick="alert('salut')" id="boutonAlerte"&gt;Alerte&lt;/button&gt;
    &lt;/div&gt;
    &lt;script type="text/javascript" src="cordova.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="js/index.js"&gt;&lt;/script&gt; &lt;/body&gt;
</code></pre>

<p>but the problem is that my onclick doesn't work. A lot of people tell me to try it on javascript so I've decided to write something like that : </p>

<pre><code>function onAlertClick() {
  alert("ceci est une alerte");
}

alert("test2");

var bA = document.getElementById("boutonAlerte");
bA.addEventListener("onclick", onAlertClick());
</code></pre>

<p>But this is the same thing. </p>

<p>Any ideas ? </p>