<script>
var el = document.getElementById('btn');
e1.onclick=function()
{
//
alert('hello');
};
</script>
<button type="button" id="btn" >Log-in</button>
Je suis tout simplement tester comment unobstrusive javaScript fonctionne avec un simple bouton événement onclick(), mais quand je clique sur leUn simple exemple Unobtrusive JavaScript
double possible de [Pourquoi jQuery ou une méthode DOM comme \ 'getElementById \' trouve pas l'élément?] (http://stackoverflow.com/questions/14028959/why- does-jquery-or-a-dom-method-comme-getelementbyid-not-find-the-element) – Bergi