-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (42 loc) · 1.45 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="indigo.css">
<link href="https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap" rel="stylesheet">
<title>Document</title>
</head>
<body>
<section>
<h1> get an animated image </h1>
<br>
<div class="center">
<br>
<label for=""> enter your name</label>
<br>
<br>
<input type="text" name="" id="nameid" required>
<br>
<br>
<div class="images" >
<img src="img/images (2).jpg" alt="" width="200" height="200" id="image">
<br>
<br>
</div>
<button id="btn"> generate image</button>
</div>
</section>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous"></script>
<script>
$(document).ready(function(){
$('button').click(function()
{
const a=$('#nameid').val();
$('#image').attr('src',`https://joeschmoe.io/api/v1/${a}`);
});
});
</script>
</body>
</html>