Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

216
Views
¿Es posible hacer comandos en HTML?

Estaba pensando en si era posible tener una interfaz de línea de comandos en HTML, con algo de CSS o script. Como si escribieras un comando y hace una función como revelar texto o algo así.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Muy bien, aquí hay una actualización para el JS. Voy a encontrar una manera de hacer que realice una acción de ocultar/mostrar al escribir "ejecutar [insertar nombre]"

 function getInput() { return document.getElementById("answer").value; } var submitButton = document.getElementById("submit").addEventListener("click", mySubmit); function mySubmit() { var text; var database = [{ answer: "help", clue: "info, credits, run" }, { answer: "info", clue: "made by: SkyKrye" }, { answer: "credits", clue: "StackOverflow, W3Schools, Discord" }, { answer: "run", clue: "unspecified program: run [insert program name]" } ]; for (var i = 0; i < database.length; i++) { if (database[i].answer === getInput()) { text = database[i].clue; console.log(text); } } if (!text) { text = "Syntax Error"; } document.getElementById("demo").innerText = text; }
 button { font-family: consolas; margin: 10px; color: white; background: #111; box-shadow: #111; border-radius: 5px; border-width: 2px; background-color: #222; display: inline-block; width: 120px; height: 26px; overflow: hidden; text-overflow: ellipsis; } button:hover { transform: scale(1.5); transition: all .2s ease-in-out; body { background-color: #333; color: white; font-family: consolas; font-size: 20px; }
 <input type="text" name="inputField" id="answer" placeholder="Enter command" required> <button id="submit" type="button" name="button">Submit</button> <p id="demo"></p>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!