-
Notifications
You must be signed in to change notification settings - Fork 0
/
index1.html
71 lines (64 loc) · 2.6 KB
/
index1.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script>
$(document).ready(function() {
// process the form
$('form').submit(function(event) {
event.preventDefault();
$.ajax({
type : 'GET', // define the type of HTTP verb we want to use (POST for our form)
url : 'http://127.0.0.1:8081/', // the url where we want to POST
success : function(data){
console.log(data);
}
});
// using the done promise callback
// stop the form from submitting the normal way and refreshing the page
//return false;
});
return false;
});
</script>
<style>
body{
background-image: url('http://cs-server.usc.edu:45678/hw/hw8/images/background.png');
}
.container{
border-radius: 5px;
background: #FFF;
margin-top:10px;
width: 800px;
}
#container1{
height: 150px;
}
#container2{
height: 200px;
}
</style>
</head>
<body>
<div ng-app="">
<div class="container" id = "container1">
<h4 align = "center">Stock Market Search</h4>
<form align = "center" class="form-inline" id = 'form' action = "http://127.0.0.1:8081/" method = "GET">
<label for = "symbol">Enter Stock Ticker Symbol:                 </label>
<input id = inputsymbol type = "text" name = "symbol" value = "MSFT">        
<button id = "submit" type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> Get Quote</button>
<button id = "clear" type="reset" class="btn btn-default"><i class="glyphicon glyphicon-refresh"></i> Clear</button>
</form>
</div>
<hr width = "800px">
<div class = "container" id = "container2">
</div>
</div>
</body>
</html>