1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$(function() {
//button click
$('#btn').on('click', function(e) {
if($("#test").val().match( /[Α-Ωα-ωάίόύήώέ]/i )) {
alert("Greek characters not allowed!")
return false;
}
else
return true;
});
});
<button id="btn">
Test Greek identification
</button>
<input id="test">
<div id="myDIV"></div>
origin - http://www.pipiscrew.com/?p=3939 js-check-if-greek-letters-exist