ajax跨域讀取返回值
JavaScript代碼
- <script type="text/javascript">
- $.ajax({
- url:'http://m.heaithplan.com/test/severlet/weather',
- type:'GET',
- dataType: 'json',
- success:function(data){
- alert(data.he);
- },
- error : function(e, text){
- alert(e.status);
- alert(text);
- }
- });
- /script>