Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"práctica 1"
Bootstrap 4.1.1 Snippet by
jebus
4.1.1
Preview
HTML
View Full Screen
Fork
Fork this
87
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Interfaz de Usuario</title> <style> body { font-family: Arial, sans-serif; margin: 20px; } .button, .indicator { margin: 5px 0; } </style> </head> <body> <h1>Interfaz de Usuario</h1> <div> <button class="button" onclick="toggleButton(1)">Botón 1</button> <button class="button" onclick="toggleButton(2)">Botón 2</button> <button class="button" onclick="toggleButton(3)">Botón 3</button> </div> <h2>Indicadores Booleanos</h2> <p>Estado 1: <span id="indicator1" class="indicator">✖</span></p> <p>Estado 2: <span id="indicator2" class="indicator">✖</span></p> <p>Estado 3: <span id="indicator3" class="indicator">✖</span></p> <h2>Controles Numéricos</h2> <input type="number" id="control1" oninput="updateResult(1)"> <input type="number" id="control2" oninput="updateResult(2)"> <input type="number" id="control3" oninput="updateResult(3)"> <h2>Indicadores Numéricos</h2> <p>Resultado 1: <span id="result1" class="indicator">0</span></p> <p>Resultado 2: <span id="result2" class="indicator">0</span></p> <p>Resultado 3: <span id="result3" class="indicator">0</span></p> <script> const states = [false, false, false]; function toggleButton(num) { states[num - 1] = !states[num - 1]; document.getElementById(`indicator${num}`).textContent = states[num - 1] ? '✔' : '✖'; } function updateResult(num) { const value = document.getElementById(`control${num}`).value || 0; document.getElementById(`result${num}`).textContent = value; } </script> </body> </html>
Related:
See More
Template
Paper Kit Pro
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76