JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<center>
<p>To find your Horoscope click the button below!</p>
<input type='button' value='Click Me!' onclick='myHoroscope();' />
<p id="show"></p>
</center>
</body>
<script>
function myHoroscope () {
confirm("In order to find your Horoscope you need to type in the month you were born correctly!")
var age = prompt("What month were you born?")
if (age =="january")
{
document.getElementById('show').innerHTML = "January";
}
if (age =="february")
{
document.getElementById('show').innerHTML = "february";
}
if (age =="march")
{
document.getElementById('show').innerHTML = "march";
}
if (age =="april")
{
document.getElementById('show').innerHTML = "april";
}
if (age =="may")
{
document.getElementById('show').innerHTML = "may";
}
if (age =="june")
{
document.getElementById('show').innerHTML = "june";
}
if (age =="july")
{
document.getElementById('show').innerHTML = "july";
}
if (age =="august")
{
document.getElementById('show').innerHTML = "august";
}
if (age =="september")
{
document.getElementById('show').innerHTML = "september";
}
if (age =="october")
{
document.getElementById('show').innerHTML = "You are either the Libra 10/1 - 10/22 or Scorpio";
}
if (age =="november")
{
document.getElementById('show').innerHTML = "The Scorpio from 11/1 -11/23 or Sagittarius";
}
if (age =="december")
{
document.getElementById('show').innerHTML = "december";
}
}
</script>