Created
November 16, 2017 15:53
-
-
Save kimyongyeon/cb96c30f10daf50bb465aaf47d79adad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type=text/javascript> | |
$(function() { | |
$('a#calculate').bind('click', function() { | |
$.getJSON($SCRIPT_ROOT + '/_add_numbers', { | |
a: $('input[name="a"]').val(), | |
b: $('input[name="b"]').val() | |
}, function(data) { | |
$("#result").text(data.result); | |
}); | |
return false; | |
}); | |
}); | |
</script> | |
<h1>jQuery Example</h1> | |
<p><input type=text size=5 name=a> + | |
<input type=text size=5 name=b> = | |
<span id=result>?</span> | |
<p><a href=# id=calculate>calculate server side</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment