• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
彭小妍
博客园    首页    新随笔    联系   管理    订阅  订阅
2017年5月28日
原生JS封装Ajax
摘要: function json2url(json){ //json参数转字符串 json.t=''+Math.random(); json.t=json.t.replace('.',''); var arr=[]; for(var name in json){ arr.push(name+'='+jso 阅读全文
posted @ 2017-05-28 13:27 彭小妍 阅读(220) 评论(0) 推荐(0)
原生JS封装Ajax(原理)
摘要: 1.创建一个ajax对象 var oAjax=new XMLHttpRequest();2.连接 oAjax.open('GET','a.txt'+'?'+data,true); oAjax.open('POST',url,true);3.发送 oAjax.send(); oAjax.setRequ 阅读全文
posted @ 2017-05-28 13:17 彭小妍 阅读(128) 评论(0) 推荐(0)
2017年5月26日
ajax——模仿新浪微博留言板
摘要: <style type="text/css"> *{margin:0; padding:0;} .fl{float:left;} .fr{float:right;} .clearFix:after{display:block; clear:both; content:""; } a{text-dec 阅读全文
posted @ 2017-05-26 14:40 彭小妍 阅读(161) 评论(0) 推荐(0)
轮播图(二)
摘要: <style type="text/css"> .div1{width: 660px;overflow: hidden;margin: 60px auto;position: relative;} .div2{width: 10000px;position: relative;} .div2 img 阅读全文
posted @ 2017-05-26 14:21 彭小妍 阅读(115) 评论(0) 推荐(0)
轮播图(一)
摘要: <style> *{ margin:0; padding:0; list-style:none; } .box{ width:520px; height:280px; margin:100px auto; overflow:-hidden; position:relative; border:2px 阅读全文
posted @ 2017-05-26 11:59 彭小妍 阅读(118) 评论(0) 推荐(0)
checkbox全选、反选
摘要: <body> <div class="div1"> <input type="checkbox" name="cb"> </div> <hr> <div class="div2"> <input type="checkbox" name="cbs"><br> <input type="checkbo 阅读全文
posted @ 2017-05-26 11:42 彭小妍 阅读(149) 评论(0) 推荐(0)
仿(用原生js封装jQuery库——运动)
摘要: function JQuery(arg){ //存对象 this.elements=[]; switch(typeof arg){ case 'string': this.elements=getEle(arg); this.length=this.elements.length; break; c 阅读全文
posted @ 2017-05-26 10:38 彭小妍 阅读(520) 评论(0) 推荐(0)
仿(用原生js封装jQuery库——$、选择器)
摘要: function JQuery(arg){ //存对象 this.elements=[]; switch(typeof arg){ case 'string': this.elements=getEle(arg); this.length=this.elements.length; break; c 阅读全文
posted @ 2017-05-26 10:29 彭小妍 阅读(2590) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3