上一页 1 ··· 7 8 9 10 11 12 13 下一页

2018年8月31日

input只允许输入正整数

摘要: onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.val 阅读全文

posted @ 2018-08-31 14:23 Just丶随心 阅读(203) 评论(0) 推荐(0) 编辑

2018年5月22日

CSS如何作小于1PX的边

摘要: 小于1PX的边能使页面变得更加精致,那么具体怎么做呢? 主要思路就是设置伪元素先放大再通过变换缩小。 代码如下 .border { position: relative;//如果有圆角 } .border:before { left: 0; border-radius: 20px;//如果有圆角 c 阅读全文

posted @ 2018-05-22 10:01 Just丶随心 阅读(380) 评论(0) 推荐(0) 编辑

2018年3月23日

时间戳的处理

摘要: 1.获取时间戳 var timestamp=new Date().getTime(); 2.转时间戳 nian='';yue='';ri='';shi='';fen='';miao='';Date.prototype.toLocaleString = function() {if(this.getF 阅读全文

posted @ 2018-03-23 11:34 Just丶随心 阅读(320) 评论(0) 推荐(0) 编辑

图片转base64上传,视频同理。

摘要: body: <input type="file" id="img" type="file" onchange="up()" style="width: 100%;height: 100%;position:absolute ;top: 0;left:0;opacity: 0;"> js: imgDa 阅读全文

posted @ 2018-03-23 10:54 Just丶随心 阅读(327) 评论(0) 推荐(0) 编辑

2017年12月21日

APIcloud微信支付和支付宝支付(方案2,主要在后台进行)

摘要: 支付宝代码 var aliPay = api.require('aliPay'); api.ajax({ url: yuming+'index.php/api/Alipay/getOrder', method: 'post', data:{values: { 'user_id':$api.getSt 阅读全文

posted @ 2017-12-21 17:12 Just丶随心 阅读(3172) 评论(0) 推荐(0) 编辑

2017年11月14日

H5滑条(input type=range)

摘要: input[type=range] { -webkit-appearance: none; width: 230px; border-radius: 10px; /*这个属性设置使填充进度条时的图形为圆角*/ display: block; margin: 0 auto; margin-top: 2 阅读全文

posted @ 2017-11-14 13:52 Just丶随心 阅读(1903) 评论(0) 推荐(0) 编辑

2017年9月20日

checkbox/radio 样式修改

摘要: 只改颜色 input[type=radio],input[type=checkbox] { display: inline-block; vertical-align: middle; width: 20px; height: 20px; margin-left: 5px; -webkit-appe 阅读全文

posted @ 2017-09-20 13:46 Just丶随心 阅读(450) 评论(0) 推荐(0) 编辑

2017年9月11日

APIcloud制作APP 微信支付与支付宝支付

摘要: 首先要在云端绑定相应模块如alipay和wxpay其次编写代码。 配置区域 var cfg = { webName:'',//APP名字 payDebug:true, isUseWxPay:true, isUseAliPay:true, wxApiKey : 'wx708c359136e7af15' 阅读全文

posted @ 2017-09-11 11:07 Just丶随心 阅读(847) 评论(0) 推荐(2) 编辑

2017年7月8日

JS获取鼠标左(右)滑事件

摘要: 鼠标左(右)滑也是网站开发中常见的效果之一,这里对鼠标左(右)滑做出一些解释。 首先要获取需要左右滑事件的节点: eg: var div=document.getElementById("div"); 然后获取点击事件onmousedown并传参: eg: div.onmousedown=funct 阅读全文

posted @ 2017-07-08 19:58 Just丶随心 阅读(6250) 评论(0) 推荐(1) 编辑

2017年7月1日

PHP连接数据库(mysql)

摘要: 前端链接后台,数据库几乎必不可少。所以本文总结了PHP链接数据库的常用方法步骤。 首先 链接数据库:mysqli_connect参数①主机地址 ②mysql用户名③nysql密码④选择连接的数据库⑤端口号 返回:如果连接成功,返回资源类型的标识符号 连接失败返回false如果我们与mysql建立的连 阅读全文

posted @ 2017-07-01 11:38 Just丶随心 阅读(207) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 下一页

导航