更新时间:2022-06-03 04:12:33
(文档)。 ready(function(){
debugger;
(document).ready(function () {
debugger;
.ajax({
url:'http://本地主机:25012 / NewsRestService.svc / WrappedNe wsById / 4',
数据:{},
contentType:application / json; charset = utf-8,
dataType:json,
cache:false,
})。success(function(data) {
alert(数据);
.ajax({
url: 'http://localhost:25012/NewsRestService.svc/WrappedNewsById/4',
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
cache: false,
}).success(function (data) {
alert(data);
('#data')。append(JSON.stringify(data));
});
})
< / script>
另一种代码:
< script type =text / javascript>
调试器;
var service = 'http:// localhost:25012 / NewsRestService.svc / NewsById /';
('#data').append(JSON.stringify(data));
});
})
</script>
Another Type of Code:
<script type="text/javascript">
debugger;
var service = 'http://localhost:25012/NewsRestService.svc/NewsById/';