JavaScript
2
Вклад в тег
function test(obj){
var badWords = ["гумно"];
currentText = obj.value;
for(var i = 0; i < badWords.length; i++){
re = new RegExp(badWords[i], "gi");
if(re.test(currentText)){
temp = "";
for(var j = 0; j < badWords[i].length; j++){
temp += "*";
}
currentText = currentText.replace(re, temp);
obj.value = currentText;
}
}
}
<textarea onkeyup="test(this)"></textarea>
If(isset(...)){
$query .= 'where field >= ?'
}