-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
53 lines (42 loc) · 1.49 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Automatic HTML Generate Code</title>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
App name<br>
<input name="app" type="text"/><br>
App description<br>
<input name="desc" type="text"/><br>
Image link<br>
<input name="imglink" type="text"/><br>
App link<br>
<input name="applink" type="text"/><br>
Price<br>
<input name="price" type="text"/><br>
<code id="output"></code>
</body>
<script>
$(function() {
$("input[type=text]").on("input", function() {
var app = $("[name=app]").val();
var desc = $("[name=desc]").val();
var imglink = $("[name=imglink]").val();
var applink = $("[name=applink]").val();
var price = $("[name=price]").val();
$("#output").get(0).innerHTML = $('<div/>').text('<a class="fragment" href="' + applink + '" target="_blank"> \
<div> \
<img class="imgbor" src="' + imglink + '" alt="some description" /> \
<span class="styleraise">' + app + '</span> \
<span class="styleraise1">' + price + '</span> \
<div class="textpara">' + desc + '</div> \
</div> \
</a>').html();
});
});
</script>
</html>