摘要: 1、什么是mvvm? mvvm是Model-View-ViewModel的缩写,mvvm是一种设计思想,Model层代表数据模型,也可以在Model中定义数据修改和操作的业务逻辑,View是UI组件,他负责将数据模型转化成UI展现出来,ViewModel是一个同步View和Model的对象 在MVV 阅读全文
posted @ 2019-01-21 17:46 shuihanxiao 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 一、转换成金额形式 function toMoney(num){ if(num){ if(isNaN(num)) { alert("金额中含有不能识别的字符"); return; } num = typeof num == "string"?parseFloat(num):num//判断是否是字符串 阅读全文
posted @ 2019-01-17 18:07 shuihanxiao 阅读(3399) 评论(0) 推荐(0) 编辑
摘要: <script> b("001"); function b(id) { console.log("b函数的id:"+id); //var history = "<a href='#' onclick='a(" +id + ")'>历史</a>"; 错误代码这里id默认理解成数字类型,需要"",直接在 阅读全文
posted @ 2019-01-10 14:57 shuihanxiao 阅读(2083) 评论(0) 推荐(0) 编辑
摘要: function getUrlParam1(name){ //正则表达式过滤 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg 阅读全文
posted @ 2018-12-18 19:26 shuihanxiao 阅读(602) 评论(0) 推荐(0) 编辑
摘要: // 判断是否为手机号 isPoneAvailable: function (pone) { var myreg = /^[1][3,4,5,7,8][0-9]{9}$/; if (!myreg.test(pone)) { return false; } else { return true; } 阅读全文
posted @ 2018-12-13 14:56 shuihanxiao 阅读(2809) 评论(0) 推荐(0) 编辑
摘要: //利用原生Js获取操作系统版本function getOS() { var sUserAgent = navigator.userAgent; var isWin = (navigator.platform == "Win32") || (navigator.platform == "Window 阅读全文
posted @ 2018-12-06 11:22 shuihanxiao 阅读(8823) 评论(0) 推荐(0) 编辑
摘要: 一、controller层 二、service层 1、接口 2、接口的实现 转换 阅读全文
posted @ 2018-12-03 20:33 shuihanxiao 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 获取当前时间,日期格式function currentDate() { var date = new Date(); var y = date.getFullYear(); var m = date.getMonth() + 1; // m = m < 10 ? ('0' + m) : m; var 阅读全文
posted @ 2018-12-03 16:10 shuihanxiao 阅读(4774) 评论(0) 推荐(0) 编辑
摘要: //时间戳转日期格式,传入时间戳必须为数字类型function currentDate(shijianchuo) { var date = new Date(shijianchuo); var y = date.getFullYear(); var m = date.getMonth() + 1; 阅读全文
posted @ 2018-11-29 17:09 shuihanxiao 阅读(644) 评论(0) 推荐(0) 编辑
摘要: 1、嵌入pdf: (1)利用object (2)使用超链接 2、嵌入word 3、嵌入音频 4、嵌入视频chrome等浏览器支持html5,html5中video对象支持ogg、mp4(必须是H.264)格式的视频播放。为了兼容ie和chrome,采用了如下方法: 5、嵌入flash 阅读全文
posted @ 2018-11-15 17:20 shuihanxiao 阅读(2201) 评论(0) 推荐(0) 编辑