Here's an example of what I'm trying to do.
if
$("#textinput").val("evil");
then
alert("Watch your language!");
end if
This line of code will set the value of the input
$("#textinput").val("evil");
You said you wanted to test the current text
if ($("#textinput").val() === "evil")
{
alert("Watch your language!");
}