mardi 28 avril 2015

HTML/PHP if-else Statement

I am creating a website with Bootstrap and I would like to enter an if-else statement but I do not know how to do that. Let me explain:

Here is an image of my current HTML snippet: enter image description here

Now what I want is, that if I change from "OFF" to "ON" by "An- / Ausschalten" that automatically the "Status aktuell" turns from "OFF" to "ON" and also the other way so it should look like this:

enter image description here

My current HTML code for this part is:

<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
<div class="services-wrapper">
<h3>GENERALSTEUERUNG</h3>
Steuern Sie mit nur einem Klick die komplette Lichtanlage Ihres Hauses.<br><br>
<b>Status aktuell:</b> <input id="switch-offColor" type="checkbox" data-off-color="warning" data-size="mini" readonly><br><br>
<b>An- / Ausschalten:</b> <input id="switch-offColor" type="checkbox" data-off-color="warning" data-size="mini">        
</div>
</div>

Can someone tell me what if-else code I have to use to make this possible? What should the code look like so that this works?

I would really appreciate your help.

Thanks, Chris

Aucun commentaire:

Enregistrer un commentaire