-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
34 lines (29 loc) · 1.33 KB
/
main.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
function init()
{
document.querySelector("#getsipnumber").onkeydown = function(event) {
//alert(event.target.value);
setTimeout(function tempo() {
var textWritten = document.querySelector("#getsipnumber").value;
console.log("init:: getsipnumber => textWritten == " + textWritten);
document.querySelector("x-phono").setAttribute("sipnumber", textWritten);
}, 0);
}
document.querySelector("#getsipnumber").addEventListener("paste", function(event) {
//alert(event.target.value);
//console.log("init:: getsipnumber => event.target.value == " + event.target.value);
setTimeout(function tempo() {
var textPasted = document.querySelector("#getsipnumber").value;
console.log("init:: getsipnumber => textPasted == " + textPasted);
document.querySelector("x-phono").setAttribute("sipnumber", textPasted);
}, 0);
//alert();
})
document.querySelector("#getsipnumber").addEventListener("blur", function(event) {
setTimeout(function tempo() {
var textWritten = document.querySelector("#getsipnumber").value;
console.log("init:: getsipnumber => textWritten == " + textWritten);
document.querySelector("x-phono").setAttribute("sipnumber", textWritten);
}, 0);
})
;
}