嗨,我有这个 jQuery ajax 代码
<script type="text/javascript">
jQuery(document).ready(function($) {
$.ajax({
url: "http://api.wunderground.com/api/10ea0e643a3d7699/geolookup/conditions/q/IA/Cedar_Rapids.json",
dataType: "jsonp",
success: function(parsed_json) {
var location = parsed_json['location']['city'];
var temp_f = parsed_json['current_observation']['temp_f'];
alert("Current temperature in "+location+" is: " + temp_f );
}
});
});
</script>
我想将警报的内容显示到正文中的 div 中,例如
<div id="meteo"></div>