Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions currency.html

This file was deleted.

14 changes: 0 additions & 14 deletions currency.js

This file was deleted.

12 changes: 12 additions & 0 deletions email.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Email validation</title>
<script src="email.js"></script>
</head>
<body>
<span style="padding: 5px;">
<input type="text" id="email-input" placeholder="Email..."></input>
</span>
</body>
</html>
25 changes: 25 additions & 0 deletions email.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
var checkEmail = function() {
var regexp = /^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$/;
var email = document.getElementById('email-input').value;
if (email === '')
removeFrame();
else if (regexp.test(email))
drawFrame('green');
else
drawFrame('red');
};

var removeFrame = function() {
var input = document.getElementById('email-input');
input.parentNode.style.backgroundColor = input.parentNode.parentNode.style.backgroundColor;
};

var drawFrame = function(color) {
var input = document.getElementById('email-input');
input.parentNode.style.backgroundColor = color;
};


window.onload = function() {
document.getElementById('email-input').onkeyup = checkEmail;
};
Binary file removed images/acync.gif
Binary file not shown.
Binary file removed images/casperjs.png
Binary file not shown.
Binary file removed images/demoTime.jpg
Binary file not shown.
Binary file removed images/demo_time.jpg
Binary file not shown.
Binary file removed images/karma.png
Binary file not shown.
Binary file removed images/main.jpg
Binary file not shown.
Binary file removed images/protractor-logo.png
Binary file not shown.
Binary file removed images/protractor_components.png
Binary file not shown.
Binary file removed images/takeAPhoto.jpg
Binary file not shown.
Binary file removed images/take_a_photo.jpg
Binary file not shown.
17 changes: 0 additions & 17 deletions images/yandex_lang_ru.svg

This file was deleted.

Loading