Explorar o código

added test file

Pavel %!s(int64=7) %!d(string=hai) anos
pai
achega
8ca1e9cd66
Modificáronse 1 ficheiros con 23 adicións e 0 borrados
  1. 23 0
      test/testpr.md

+ 23 - 0
test/testpr.md

@@ -0,0 +1,23 @@
+### Test code
+
+```
+var credentials = { 
+   	login: 'admin',
+    password: 'qwerty',};
+
+var userLogin;
+var userPassword;
+function func(){ 
+  	userLogin = document.getElementById("login").value;
+	userPassword = document.getElementById("password").value;
+ if (userLogin === credentials.login && userPassword === credentials.password){
+	document.getElementById("success").style.display="block";
+	return false;
+	} 
+	 else {
+	document.getElementById("wrong").style.display="block";
+	return false;
+	}
+ }
+document.getElementById("submit").onclick = func;
+```