
javascript
yangxin_LZHH
这个作者很懒,什么都没留下…
展开
-
js 给textarea输入框内容自动添加换行符
提交 js:var font_size = 14;$(document).ready(function(){ $("#upload").click(function(){$("#caaaa").find("textarea").each(function(index, element) {var textareaValue=''; va原创 2017-10-04 10:55:47 · 10560 阅读 · 3 评论 -
VUE 引入可删除、可上传、可设置默认的swiper 子页面动态轮播图。
首先,我们要实现swiper的引用。swiper的引用,网上很多。先上效果图,提示,此处为vue的子页面创建swiper局部视图vue界面:<template> <div class="pc-slide"> <el-upload class="upload-demo " :headers="headers" action="/admin/file/...原创 2019-05-25 00:01:16 · 1026 阅读 · 0 评论 -
mui+vue 绑定动态轮播图
如标题, 直接上代码。template 直接罗列,可拆分成可视html标签 #slider2.mui-slider .mui-slider-group.mui-slider-loop .mui-slider-item.mui...原创 2019-01-23 15:32:54 · 658 阅读 · 0 评论 -
微信浏览器禁掉上下滑动(必看)
最近用mui+vue做了一个公众号系统,mui-scroll 的滚动和 微信浏览器的上下滑动滑动冲突,会引起页面卡顿,无论怎么调整阻尼系数,问题依然存在,而且,比较坑爹。网络查了好久,各种阻止依然不可用,浪费太多时间,在突然的看了一篇文章里,在浏览器阻止滚动下方,加了个passive:false居然实现了我要的效果。虽然不明白为啥,但是很开心,分享给大家。 //阻止浏览器默认滑动 ...原创 2019-01-22 22:11:36 · 6844 阅读 · 3 评论 -
js 判断字符串是否为空
//判断是否为空,空返回ture,非空返回falsefunction IsNullOrEmpty(val){ if(val =="0"||val==0){ return false;} elseif(val == ""||val==null||val==undefined||val=="null"||val=="undefined"){ retu...原创 2019-05-25 10:13:24 · 1034 阅读 · 0 评论 -
调用mui插件,窗体无法滑动问题
最近做移动端开发,需要一个侧滑功能,由于偷懒,调用了mui的侧滑功能,然而引用了mui.js之后,侧滑是可以了,放在移动端的滑动事件就没了。查找再三,发下如下问题。mui里将滑动事件自己禁止了。// document.addEventListener('touchmove', function(e) { e.preventDefault(); }, false)原生配了个方法,支持区域...原创 2018-08-16 11:34:56 · 1051 阅读 · 0 评论 -
Jquery轨道图插件 Subway Map 解释
I have always been fascinated by the visual clarity of the London Underground map. Given the number of cities that have adopted this mapping approach for their own subway systems, clearly this is a po...转载 2018-08-07 11:25:16 · 2899 阅读 · 0 评论 -
js 替换全部字符串
var replaceAll =function (FindText, RepText) { regExp = new RegExp(FindText,"g");return this.replace(regExp, RepText);}原创 2018-01-15 23:30:28 · 228 阅读 · 0 评论 -
下载方法,移动端或者浏览器均可
window.downloadFile = function (sUrl) { //iOS devices do not support downloading. We have to inform user about this. if (/(iP)/g.test(navigator.userAgent)) { alert('Your device原创 2017-12-19 10:04:37 · 2870 阅读 · 1 评论 -
JQUERY Mobile 图标
图标data-icon="arrow-l" 左箭头 测试data-icon="arrow-r" 右箭头 测试data-icon="arrow-u" 上箭头 测试data-icon="arrow-d" 下箭头 测试data-icon="plus" 加 测试data-icon="minus" 减 测试data-icon="delete" 删除 测试data-icon="原创 2017-12-22 11:34:34 · 535 阅读 · 0 评论 -
jQuery Mobile 过渡效果
jQuery Mobile 拥有一系列关于如何从一页过渡到下一页的效果。注释:如需实现过渡效果,浏览器必须支持 CSS3 3D 转换:浏览器支持Internet Explorer 10 支持 3D 转换(更早的版本不支持)Opera 仍然不支持 3D 转换过渡效果可应用于任意链接或通过使用 data-transition 属性进行的表单提交:滑动到页面二下面的表格展示了转载 2017-12-22 11:33:40 · 324 阅读 · 0 评论 -
Node js 写 hello word
1.安装:到Node.js官网下载就可以了,才5M多点,双击后按步骤安装就可以了。2."Hello World"首先,创建个hello.js的文件,在文件中copy如下代码:var http = require('http');http.createServer(function (req, res) { res.writeHead(200, { 'Content-Type': '原创 2017-12-04 16:52:27 · 447 阅读 · 0 评论 -
前端弹出框(js/css/html)
//html LYNC大图片原创 2017-12-04 16:41:15 · 839 阅读 · 0 评论 -
js 网站增加统计代码
var _hmt = _hmt || [];(function() { var hm = document.createElement("script"); hm.src = "//hm.baidu.com/hm.js?3c4f00ec8688fae0bf202497b6262c89"; var s = document.getElementsByTagName("scrip原创 2017-11-29 11:00:46 · 2554 阅读 · 0 评论 -
mui 支付微信、支付宝
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> mui.init(); mui.plusReady(function() { //改写返回键 并刷新消息界面显示的消息(读过的变为已读) d转载 2017-11-29 10:58:42 · 2824 阅读 · 0 评论 -
js引用+时间戳
var now = new Date(); var number = now.getYear().toString() + now.getMonth().toString() + now.getDate().toString() + now.getHours().toString() + now.getMinutes().toString() + now.get原创 2017-11-29 10:57:17 · 2360 阅读 · 0 评论 -
uploadify 前端使用
var jcrop_api = null;var ue = null;var savePath = '/Uploads/ShimaoNews/';var OldPictureUrl = "";//原图路径var CheckTitleTab = 0;//新闻标题是否重复判别字段//图片宽高、临时数据记录图片宽高、图片、左边距、上边距$(function () {原创 2017-11-29 10:55:41 · 491 阅读 · 0 评论 -
JS获取当前日期
var now = new Date(); var number = now.getYear().toString() + now.getMonth().toString() + now.getDate().toString() + now.getHours().toString() + now.getMinutes().toString() + now.get原创 2017-11-29 10:53:54 · 231 阅读 · 0 评论 -
vue 格式化数值方法
/*** 格式化价格* @param val* @returns price*/export const iegAmount = (val) => { let regex = /\S/; if(regex.test(val)){ return Number(val).toFixed(2).replace(/(\d)(?=(\d{3})+\.)...原创 2019-09-12 13:53:09 · 5422 阅读 · 0 评论