赞
踩
<div class="time"></div>
<script src="https://pv.sohu.com/cityjson?ie=utf-8" type="text/javascript"></script>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
- <script>
- var main = this
- jQuery.support.cors = true
- $.ajax({
- url: "http://wthrcdn.etouch.cn/weather_mini",
- type: "GET",
- dataType: "json",
- data: { city: returnCitySN.cname.split("省")[1] }, //(returnCitySN.cname).split('省')[1]:获取所在的市
- success: function (res) {
- //var res=JSON.parse(res);
- main.city = res.data.city //所在城市
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。