Skip to content

Instantly share code, notes, and snippets.

@thams017
Last active March 4, 2016 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thams017/0c71583ab9a62de985f8 to your computer and use it in GitHub Desktop.
Save thams017/0c71583ab9a62de985f8 to your computer and use it in GitHub Desktop.
var a;
function validateKey( ele ) {
if ( a === ele.value )
{
ele.value = "";
}
if( ele.value !== "X" &&
ele.value !== "x" &&
ele.value !== "O" &&
ele.value !== "o"
) {
ele.value = "";
}
else {
validate( ele );
a = ele.value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment