Recently I made a function called Converter. It was working perfectly in the morning and now when I am using it, the code is not being able to run when I type numeric like 3 it should print like Three but I do now know what is the problem and problem also not showing. I am new in Javascript Here is the code
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script>
function abc()
{
// alert('hello');
var amt=parseInt(document.getElementById('t1'));
var d="";
var ones=Array("","One","Two","Three","four","five");
var tens=Array("","","Twenty","Thirthy","Fourthy","fifthy");
var hundreds=Array("","One hundred","Two hundred","Three hundred","Four hundred","Five hundred");
if(amt>=1&&amt<=19)
{
d=ones[amt];
}
document.getElementById('p1').innerHTML=d;
// document.write(d);
}
</script>
</head>
<body>
<input type="text" id="t1" />
<input type="button" value="Convert" onclick="abc()" />
<p id="p1"></p>
</body>
</html>