init
This commit is contained in:
24
templates/index.html
Normal file
24
templates/index.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>The jQuery Example</title>
|
||||
|
||||
<h2>jQuery-AJAX in FLASK. Execute function on button click</h2>
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"> </script>
|
||||
<script type=text/javascript> $(function() { $("#mybutton").click(function (event) { $.getJSON('/SomeFunction', { },
|
||||
function(data) { }); return false; }); }); </script>
|
||||
<script type=text/javascript> $(function() { $("#mybutton2").click(function (event) { $.getJSON('/SomeFunction2', { },
|
||||
function(data) { }); return false; }); }); </script>
|
||||
<script type=text/javascript> $(function() { $("#mybutton3").click(function (event) { $.getJSON('/SomeFunction3', { },
|
||||
function(data) { }); return false; }); }); </script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<input type = "button" id = "mybutton" value = "Click Here" />
|
||||
<input type = "button" id = "mybutton2" value = "Click Here" />
|
||||
<input type = "button" id = "mybutton3" value = "Click Here" />
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user