This script is supposed to show an alert if the text is longer than eight characters, what is wrong with it?
<!DOCTYPE html>
<html>
<body>
<input id="input"><button onclick="myFunction()">Click me</button>
<script>
function myFunction()
{
var x=document.getElementById("input").value
if (x = > 8)
{
alert("Text must be lower than 8 letters")
return false;
}
}
</script>
</body>
</html>
please help, thanks