I have the follwing jQuery:
$("#textArea").keyup(function(){
var textAreaValue = $("textArea");
if(!textArea.value.indexOf("some string")){
textArea.value = textArea.value.replace("some string",null);
alert("It was there!");
}
});
Is it normal for
element.value.replace("some string",null);
to replace"some string"
with"null"
as a string? And if normal can you please explain why?I have tested it with
element.value.replace("some string","")
, and that works fine, so what would be the difference betweennull
and""
?
Using FireFox 3.6.3, Thanks in advance.