-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
46 lines (41 loc) · 1.91 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//PlaceHolder
/*var myInput = document.getElementById("my-input");
myInput.onfocus = function() {
"use strict";
myInput.setAttribute('data-place', this.getAttribute("placeholder"));
myInput.setAttribute("placeholder", " ");
};
myInput.onblur = function() {
"use strict";
myInput.setAttribute('placeholder', this.getAttribute("data-place"));
myInput.setAttribute("data-place", " ");
};*/
/*TypeWriter*/
/*
var myText =
"Create an offline installation of Visual Studio 2017 If you are looking for an offline option for installing Visual Studio 2017, we can point you in the right direction. If you want to install a single instance of Visual Studio 2017 but your internet connection is unavailable or unreliable, see our Install Visual Studio 2017 on low bandwidth or unreliable network environments page. If you are an enterprise administrator who wants to perform a large deployment of Visual Studio 2017 to a network of client workstations that are firewalled from the internet, see our Create a network installation of Visual Studio 2017 and Special considerations for installing Visual Studio in an offline environment pages.",
i = 0,
mybutton = document.getElementById("btn");
mybutton.onclick = function() {
"use strict";
var typeWriter = setInterval(function() {
document.getElementById("type").textContent += myText[i];
i++;
if (i > myText.length - 1)
clearInterval(typeWriter, 100);
}, 200);
};
*/
//Hide Password
var myBtn = document.getElementById('my-btn'),
myInput = document.getElementById('my-input');
myBtn.onclick = function() {
"use strict";
if (myBtn.textContent === 'Show password') {
myInput.setAttribute('type', 'text');
myBtn.textContent = 'Hide Password';
} else if (myBtn.textContent === 'Hide Password') {
myInput.setAttribute('type', 'password');
myBtn.textContent = 'Show password';
}
};