JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
function check()
{
var value = document.getElementById("txtin").value;
if ((value in [,1,2,3]))
alert("Do SomeThing");
}
</script>
</head>
<body>
<a href="#" onclick='check()'>check</a>
<input type="text" id="txtin"/>
</body>
</html>