<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript">
function check() {
var name = document.getElementById('text').value;
if (name == "Mark") {
alert("You can go");
}
else {
alert("You shell not past!");
}
}
</script>
</head>
<body>
<p>Введите ваше имя<input id="text"> <input type="button" value="click me" onclick="check()"></p>
</body>
</html>
|