forked from ayushruchandani/SML_MovieRecommendation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaja.html
60 lines (50 loc) · 1.15 KB
/
aja.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
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#div1").click(function(){
stt=[0,0.2,0,0.6,0,0,0.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
ab = 1;
var formData = new FormData();
formData.append('numarg', ab);
formData.append('stringarg',stt);
$.ajax({
type: "POST",
contentType: false,
processData: false,
url: "http://localhost:8010",
data: formData,
success: function(result){
console.log(result)
},
dataType: 'json'
});
});
$("#div2").click(function(){
stt='The Dark Knight Rises';
ab = 2;
var formData = new FormData();
formData.append('numarg', ab);
formData.append('stringarg', stt);
$.ajax({
type: "POST",
contentType: false,
processData: false,
url: "http://localhost:8010",
data:formData,
success: function(result){
console.log(result)
},
dataType: 'json'
});
});
});
</script>
</head>
<body>
<button id="div1"><h2>Multiple Strings</h2></div>
<button id="div2"><h2>Simple String</h2></div>
</body>
</html>