摘要: ###自制提示弹窗 ``` /*弹窗样式*/ .alertBox{ background: #CCE8CF none repeat scroll 0 0; border: 1px solid #696969; color: #000; height: 145px; left: 41%; font-s 阅读全文
posted @ 2016-12-15 11:26 舒馨6009 阅读(313) 评论(0) 推荐(0) 编辑
摘要: gulp操作基本功能.示例代码: var gulp = require("gulp");//创建 gulp模块 var adel = require("del");//创建 gulp模块 var jsCompass = require("gulp-uglify");//创建js混淆压缩 模块 var 阅读全文
posted @ 2016-11-02 22:17 舒馨6009 阅读(330) 评论(0) 推荐(0) 编辑
摘要: //js定义对象的几种容易犯的错误function Person() { getName = function (){ console.info(1); }; return this;}//Person.getName();//提示错误:这不是一个函数Person.getName = functio 阅读全文
posted @ 2016-10-26 14:01 舒馨6009 阅读(268) 评论(1) 推荐(0) 编辑
摘要: ```javascript 1.js对象,value的值取不到,试着将引入的js文件放到body的后面 $("input[type='time']").change( function() { // 这里可以写些验证代码 var a = "1234"; var val = $(this).val() 阅读全文
posted @ 2016-09-23 16:26 舒馨6009 阅读(214) 评论(0) 推荐(0) 编辑
摘要: /** * 工具类 */var tools = { /** * 获取当月最后一天的周日 * @param {Number} now [当前月份任意一天] * @return {number} [当月最后一天的周日日期] */ monthSchelEnd: function(now){ var end 阅读全文
posted @ 2016-09-20 15:37 舒馨6009 阅读(247) 评论(0) 推荐(0) 编辑
摘要: <p><label for="wheelDelta"> 滚动值:</label>(IE/Opera)<input type="text" id="wheelDelta" /></p> <p><label for="detail"> 滚动值:(Firefox)</label><input type=" 阅读全文
posted @ 2016-09-20 15:34 舒馨6009 阅读(159) 评论(0) 推荐(0) 编辑
摘要: javascript、Jquery获取浏览器和屏幕各种高度宽度 Javascript: alert(document.body.clientWidth); //网页可见区域宽(body) alert(document.body.clientHeight); //网页可见区域高(body) alert 阅读全文
posted @ 2016-09-20 15:33 舒馨6009 阅读(211) 评论(0) 推荐(0) 编辑
摘要: // JavaScript Document $(function(){ mobile.init(); }) var mobile={ init:function(){ //mobile.vote();//投TA一票 mobile.dragDrop();//投票弹层提示动画 mobile.getVe 阅读全文
posted @ 2016-09-20 15:29 舒馨6009 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 数字每个四位以空格隔开 //格式化金额 var numberFormat = $(".num"); //一串数组 function spliteArr(arr){ //alert(numberFormat); // for(var j=0;j<$(numberFormat).length;j++){ 阅读全文
posted @ 2016-09-20 15:27 舒馨6009 阅读(730) 评论(0) 推荐(0) 编辑
摘要: //判断访问的浏览器,如果是手机,就跳入别的页面 ```<script> function apart(){ var u; var browser = { /*判断访问终端*/ versions:function(){ u = navigator.userAgent, app = navigator 阅读全文
posted @ 2016-09-20 15:26 舒馨6009 阅读(211) 评论(0) 推荐(0) 编辑