• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
qiqi105
博客园    首页    新随笔    联系   管理    订阅  订阅
2018年1月27日
ajax基本原理实现
摘要: function ajax(method,url,data,success){ try{ var xhr=new XMLHttpRequest(); }catch(e){ xhr=new ActiveXObject('Mocrosoft.XMLHTTP'); } if(method=='get'&& 阅读全文
posted @ 2018-01-27 17:14 qiqi105 阅读(106) 评论(0) 推荐(0)
jsonp详细原理之一
摘要: /*script标签是不存在跨域请求的,类似的还有img,background:url,link 你可以想象一下,平时的这些标签都是可以直接引入外部资源的,所以是不存在跨域问题的*/ function getData(res){ console.log(res.data); } /*这里创建一个JS 阅读全文
posted @ 2018-01-27 10:54 qiqi105 阅读(107) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3