xze*_*gga 5 javascript rest jquery json getjson
我使用以下代码从 api 获取 json 数据:
$.getJSON( '../propertylocator/api/configurations', function(data) {
$.each( data.rows, function(i, rows) {
//var homeLatlng= new google.maps.LatLng(0, -180);
$('#map_canvas').gmap('addShape', {
'Polyline': new google.maps.LatLng(rows.latitude, rows.longitude),
'bounds': true
}).click(function() {
$('#map_canvas').gmap('openInfoWindow', { 'content': '<strong><a href="detailPage.php?id='+ rows.propertyid +'">'+rows.propertyname+'</a></strong><br/>'+rows.propertyoverview }, this);
});
});
Run Code Online (Sandbox Code Playgroud)
工作正常,但昨天我已经在 Web 应用程序中包含了带有加密密码的基本身份验证,如何在获取 json api 时包含此代码的身份验证以进行身份验证?
谢谢
| 归档时间: |
|
| 查看次数: |
9650 次 |
| 最近记录: |