document.addEventListener('DOMContentLoaded', function() { const input = document.getElementById('terminal-input'); const output = document.getElementById('terminal-output'); input.addEventListener('keypress', function(e) { if (e.key === 'Enter') { const command = input.value; output.innerHTML += `
$ ${command}
`; // Add basic command handling here if (command === 'clear') { output.innerHTML = ''; } else { output.innerHTML += `
Command not found: ${command}
`; } input.value = ''; } }); });