-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathw2a1.html
74 lines (66 loc) · 1.13 KB
/
w2a1.html
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html>
<head>
<title>Hey String checker Hello Hola</title>
<title>String checker Hello Hola hi Harshal devloper</title>
<style>
body
{
sbc dess
background-color: #dfd3f8;
}
.center
{
position: absolute;
margin: auto;
top: -10%;
right: 0;
bottom: 0;
left: 0;
width: 330px;
height: 120px;
background-color: #4a235a;
text-align: center;
color: white;
border-radius: 5%;
}
.center1
{
position: absolute;
top: 5%;
right: 0;
bottom: 0;
left: 0;
}
</style>
</head>
<body>
<div class="center">
<div class="center1">
Please enter the String to check:
<input id="str" type="text" name="fname"/>
<br> <br>
<input type="button" onclick="myfunction()" value="Check"/>
</div>
</div>
<script>
function isEmpty(x)
{
this.x=x;
this.newnumber= function()
{
if(this.x.trim().length==0 || this.x== null)
return true;
else
return false;
};
}
function myfunction()
{
var x=document.getElementById("str").value;
var empty = new isEmpty(x);
alert(empty.newnumber());
}
</script>
</body>
</html>