Example


Spell Checker
<script src="/JavascriptSpellCheck/Include.js" type= "text/javascript" > </script>

<input type="text" value= "Type Here" id="input1" name="input1" >
<input type="button" value= "SpellCheck" onClick= "spellCheck()">

<script>
function spellCheck()
{
var oSpell = new JavaScriptSpellCheck();
strInput=document.getElementById("input1").value
var result= oSpell.spellCheck(strInput);

if (result==true)
{
   alert('Spelling is OK')
}
else
{
   var strAlert="Spelling Suggestion Array:\n";
   for ( i=0; i<result.length;i++);
      {
         strAlert+=(i+1)+") "+result[i]+"\n";
      }
   alert (strAlert);
   }
}
</script>