[jQuery] getJSON
[jQuery] getJSON
i am trying to load json. but it seems like its not working. nothing
is alerted. supposed to be the case?
<script type="text/javascript">
$(function() {
$.getJSON("data.js", function (json) {
alert(json);
});
});
</script>
data.js
[ {Value: 1, Item: Physics}, {Value: 2, Item: Chemistry}, {Value: 3,
Item: Biology} ];