title: Django button with javascript alert
body: <p>I'm improving my <code>Django</code> website and I would like to add <code>javascript button</code> with window alert when users clicked on this button.</p>
  
  <p>I made that in my HTML template but I'm not sure How I have to write this. My script looks like :</p>
  
  <pre><code>&lt;button onclick="myFunction()"&gt; 
          &lt;form class = "col-sm-10" method='POST' action="{% url "PDF" birthcertificate.id %}"&gt; {% csrf_token %}
          &lt;input class = "button" type ="submit" value="Générer le PDF des acte de naissance" /&gt;
      &lt;/button&gt;
  
      &lt;script&gt;
      function myFunction() {
          alert("Votre PDF a été généré");
      }
      &lt;/script&gt;
  
  
      &lt;/form&gt;
  </code></pre>
  
  <p>But I get this kind of display :</p>
  
  <p><a href="https://i.stack.imgur.com/M8eLu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M8eLu.png" alt="enter image description here"></a></p>
  
  <p>I got 2 buttons, but I want to display only the bootstrap style.
  Do you have any idea ?</p>
  
  <p>Thank you ;)</p>