JavaScript:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
$(function() {
//button click
$('#btn').on('click', function(e) {
if($("#test").val().match( /[Α-Ωα-ωάίόύήώέ]/i )) {
alert("Greek characters not allowed!")
return false;
}
else
return true;
});
});
</script>
</head>
<body>
<button id="btn">
Test Greek identification
</button>
<input id="test">
<br><div id="myDIV"></div><br>
</body>
</html>