-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
103 lines (79 loc) · 2.52 KB
/
index.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html>
<head>
<title>love calculator </title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- <link rel="stylesheet" type="text/css" href="css\trial.css"> -->
</head>
<body>
<h1 class="text-center text-gray-dark">This Project Made By ANSARI AASIF</h1>
<header>
<div class="card text-center w-50 m-auto">
<div class="card-header bg-danger text-white">LOVE CALCULATOR</div>
<div class="card-body">
<form class="form-inline m-auto w-75">
<div class="form-group">
<input type="text" name="" class="form-control text-center" placeholder="Your Name" id="urname">
</div>
<div>
<span class="pl-4 pr-4">+</span>
</div>
<div class="form-group">
<input type="text" name=""class="form-control text-center" placeholder="Love Name" id="lname">
</div>
</form>
<br>
<div class="w-75 m-auto">
<button class="btn btn-success w-50" onclick="lovecal()"> Done</button>
</div>
<br>
<div>
<input type="text" name="" placeholder="Love Percentage" class="text-center form-control w-25 m-auto" id="lovevalue" >
</div>
</div>
<div class="card-footer">God Bless To Your Relationship</div>
</div>
</header>
<script >
function lovecal(){
var name=document.getElementById('urname').value;
var lname=document.getElementById("lname").value;
if (name=="") {
alert("pls enter your name");
}
else if (name.length<=2) {
alert("your name is too short");
} else if (!isNaN(name)) {
alert("numbers are not allowed!!");
}
else if (lname=="") {
alert("pls enter your love name");
}
else if (lname.length<=2) {
alert("love name is too short");
} else if (!isNaN(lname)) {
alert("numbers are not allowed!!");
}
else{
var lovedata=Math.random()*100;
lovedata=Math.floor(lovedata);
document.getElementById("lovevalue" ).value=lovedata + "%";
}
}
</script>
<!-- <h1>welcome to ansari tech website :) keep smilling and keep loving :) </h1>
<button onclick="myfunc()">jstrial</button>
<p id="demo"></p>
<script >
var name=prompt("enter ur name");
/*function myfunc() {
// body...
var name=prompt("pls enter ur name"," assif ansari");
if (name!=null) {
document.getElementById('demo').innerHTML="hello"+name+"how are u today"???;
}*/
document.write("welcome "+name+" to our website");
</script>
-->
</body>
</html>