会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
sungang
博客园
首页
新随笔
联系
订阅
管理
2017年8月11日
ajax文件上传
摘要: 表单提交,文件上传是一个常用又十分麻烦的功能,以前要上传文件通常都是借助插件或者flash来实现,噼里啪啦的加载一大堆东西。自从有了HTML5的FormData后。 FormData可以把它理解成一个虚拟的表单对象,它只有一个方法append,这个可以在浏览器console一下就知道了。我们可以通过
阅读全文
posted @ 2017-08-11 23:52 sungang
阅读(103)
评论(0)
推荐(0)
2017年5月23日
vue兄弟组件传值
摘要: <!DOCTYPE html><html><head> <title>父子组件</title> <script type="text/javascript" src="vue 2.js"></script></head><body><div id="box"> <com-a></com-a> <co
阅读全文
posted @ 2017-05-23 16:43 sungang
阅读(1970)
评论(0)
推荐(0)
2017年5月22日
vue slot
摘要: <!DOCTYPE html><html><head> <title>slot</title><script type="text/javascript" src="vue.js"></script> </head><body><div id="box"> <aaa> <ul slot="ul-sl
阅读全文
posted @ 2017-05-22 16:33 sungang
阅读(159)
评论(0)
推荐(0)
vue全选和反选
摘要: <!DOCTYPE html><html><head> <title>选择</title> <script type="text/javascript" src="vue.js"></script></head><body><div id="box"> <ul> <li v-for="(index,
阅读全文
posted @ 2017-05-22 16:28 sungang
阅读(355)
评论(0)
推荐(0)
父子组件数据传递
摘要: <!DOCTYPE html><html><head> <title>父子组件</title> <script type="text/javascript" src="vue.js"></script></head><body><div id="box"> <my-aaa></my-aaa></di
阅读全文
posted @ 2017-05-22 14:37 sungang
阅读(148)
评论(0)
推荐(0)
2017年5月19日
vue 动态组件
摘要: <div id="box"> <input type="button" value="aaa组件" @click="aaa" /> <input type="button" value="bbb组件" @click="bbb" /> <component :is='a'></component></
阅读全文
posted @ 2017-05-19 15:04 sungang
阅读(165)
评论(0)
推荐(0)
vue components
摘要: 组件为:aaa <div id="box"> <aaa></aaa></div> 局部组件数据事件: var vm=new Vue({ el:"#box", data:{ a:"aaa" }, components:{ 'aaa':{ data(){ return { msg:"wo是msg哦" }
阅读全文
posted @ 2017-05-19 14:30 sungang
阅读(319)
评论(0)
推荐(0)
2017年5月18日
vue拖拽
摘要: vuejs: Vue.directive('drag',function(){ var oDiv=this.el; oDiv.onmousedown=function(ev){ var disX=ev.clientX-oDiv.offsetLeft; var disY=ev.clientY-oDiv
阅读全文
posted @ 2017-05-18 17:25 sungang
阅读(236)
评论(0)
推荐(0)
2017年4月25日
拖拽弹出框
摘要: <!DOCTYPE html><html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>拖拽效果</title> <style type="text/css"> body{ ba
阅读全文
posted @ 2017-04-25 11:46 sungang
阅读(281)
评论(0)
推荐(0)
2017年4月21日
php面向对象文件上传
摘要: 文件上传对象:class upload{ protected $fileName; protected $uploadPath; protected $imgFlag; protected $maxSize; protected $allowExt; protected $allowMime; pr
阅读全文
posted @ 2017-04-21 16:01 sungang
阅读(429)
评论(0)
推荐(0)
下一页
公告