I wrote a html website. There is a button created with bootstrap. I want to change the design of the button and the label text on it, depending on a boolean variable.
Here are the two types of buttons:
<div class="alert alert-success" role="alert">
<center><strong>Open</strong></center>
</div>
<div class="alert alert-danger" role="alert">
<center><strong>Close</strong></center>
</div>
How can I integrate this html buttons in this javascript code?:
<script>
var open = true;
if (open = true) {
} else {
}
</script>
Thanks for your help!
Aucun commentaire:
Enregistrer un commentaire