-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
55 lines (55 loc) · 1.6 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
<!DOCTYPE html>
<html>
<head>
<title>Function as a Service (FaaS)
</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js">
</script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js">
</script>
</head>
<body>
<div class="row">
<div class="col-sm-4">
</div>
<div class="col-sm-4">
<h1>FaaS in 5 minutes
</h1>
<p>Please
<b>enter your name
</b> and
<b>click submit
</b>.
</p>
<input type='text' id='_the_string' />
<button id='_the_button' value='Reverse string' onclick="reverseString()">submit
</button>
<hr />
<h1>Result
</h1>
<p id="result">Result: ...
</p>
<script type="text/javascript">
function reverseString() {
$.ajax({
url: "https://rpc.ssvm.secondstate.io:8081/api/run/161/say",
type: "post",
data: $('#_the_string').val(),
contentType: "text/plain",
processData: false,
success: function(data) {
$('#result').html(data);
}
});
}
</script>
</div>
<div class="col-sm-4">
</div>
</div>
</body>
</html>