JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://fonts.googleapis.com/css?family=Quicksand" rel="stylesheet">
<title>Document</title>
<style>
body {
background-color: #282828;
margin: 0;
padding: 0;
}
h1 {
color: #F28;
text-align: center;
font-family: 'Quicksand', sans-serif;
font-size: 58px;
position: absolute;
top: 30%;
left: 50%;
transform: translate(-50%,-50%);
line-height:1.5em;
}
input {
text-align: center;
font-family: 'Quicksand', sans-serif;
font-size: 15px;
position: absolute;
top: 65%;
left: 50%;
transform: translate(-50%,-50%);
}
</style>
</head>
<body>
<h1><em>Escreva o nome de alguem.</em></h1>
<link type="text/javascript" src="page.js">
<input type="text" name="Thing" value="" />
</body>
</html>
JavaScript
window.onload = function () {
/* event listener */
document.getElementsByName("Thing")[0].addEventListener('change', doThing);
/* function */
function doThing(){
if (this.value == "Bianca") {
document.querySelector("em").innerText = "Mulher do Mateus Nery"
} else if (this.value == "Veronica") {
document.querySelector("em").innerText = "Ta namorando !!"
}
else if (this.value == "Juan") {
document.querySelector("em").innerText = "Bixa pao com ovo !!"
}
else if (this.value == "Raissa") {
document.querySelector("em").innerText = "Sapatao !!!"
} else {
document.querySelector("em").innerText = this.value;
}
}
}