上一页 1 2 3 4 5 6 ··· 24 下一页
摘要: 最近想把项目里添加grunt,说白了就是前端自动化管理,具体配置如下:用到以下几个部件:grunt-contrib-cssmingrunt-contrib-uglifygrunt-contrib-jshintgrunt-contrib-imagemingrunt-contrib-concat这几个应... 阅读全文
posted @ 2014-10-29 17:02 小猩猩君 阅读(526) 评论(0) 推荐(0) 编辑
摘要: bind(type,[data],fn) 为每个匹配元素的特定事件绑定事件处理函数$("a").bind("click",function(){alert("ok");});live(type,[data],fn) 给所有匹配的元素附加一个事件处理函数,即使这个元素是以后再添加进来的$("a").l... 阅读全文
posted @ 2014-10-27 17:00 小猩猩君 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 1 function installGrunt(data) {2 for (var val in data) {3 console.log(data[val]);4 }5 }6 7 installGrunt(['a', 'b', 'c']); 阅读全文
posted @ 2014-02-24 15:48 小猩猩君 阅读(184) 评论(0) 推荐(0) 编辑
摘要: http://se.360.cn/v6/help/meta.html 阅读全文
posted @ 2014-02-21 16:31 小猩猩君 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 1 function Car(model, year, miles) { 2 this.model = model; 3 this.year = year; 4 this.miles = miles; 5 } 6 7 Car.prototype.toString = function() { 8 return this.model + " has done " + this.miles + " miles"; 9 };10 11 var civic = new Car("Honda Civic", 2009, 20000);12 va 阅读全文
posted @ 2014-02-08 16:10 小猩猩君 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 1 var fs = require('fs'); 2 var txt = "以上程序使用fs.readFileSync从源路径读取文件内容,并使用fs.writeFileSync将文件内容写入目标路径。"; 3 4 //写入文件 5 fs.writeFile('message.txt', txt, function (err) { 6 if (err) throw err; 7 console.log('It\'s saved!'); //文件被保存 8 }); 9 10 //读取文件11 fs.readFile(& 阅读全文
posted @ 2014-01-26 09:57 小猩猩君 阅读(14011) 评论(0) 推荐(0) 编辑
摘要: 1 module.exports = function (grunt) { 2 3 // 构建任务配置 4 grunt.initConfig({ 5 6 //读取package.json的内容,形成个json数据 7 pkg: grunt.file.readJSON('package.json'), 8 9 //压缩js10 uglify: {11 //文件头部输出信息12 options: {13 banner: '/*! ... 阅读全文
posted @ 2013-12-23 16:57 小猩猩君 阅读(3851) 评论(0) 推荐(1) 编辑
摘要: 1 var O_dialog = $("#dialog-modal"); 2 O_dialog.dialog({ 3 closeOnEscape: false, 4 width: 250, 5 height: 80, 6 resizable: false, 7 draggable: false, 8 modal: true, 9 title: "正在加载,请稍候...",10 //隐藏默... 阅读全文
posted @ 2013-12-20 09:09 小猩猩君 阅读(22549) 评论(0) 推荐(0) 编辑
摘要: 首先页面加载时候显示遮罩层jQuery(function() { show_dialog(); //tianxie();});定义一个全局数组,用于存放问题idvar qar = [];循环问题id,并赋值到qar数组中for (quid_index = 0; quid_index < results.totalProperty; quid_index++) { questions[quid_index] = []; questions[quid_index][0] = results.content[quid_index].quid; //问题编号 questi... 阅读全文
posted @ 2013-12-16 16:30 小猩猩君 阅读(3600) 评论(0) 推荐(0) 编辑
摘要: html:1 javascript: 1 //管理端短信 2 var textarea_text = "此短信功能仅限于工作联络之用,切勿发送保密或敏感信息!支持移动、联通、小灵通,小灵通号码前需加区号;多个号码间用空格分隔可支持群发。"; 3 var dxtd_text = $(".dxtd_text"); 4 dxtd_text.val(textarea_text); 5 dxtd_text.on("focus", function () { 6 if (dxtd_text.val() == textarea_text) { 7 阅读全文
posted @ 2013-12-06 16:45 小猩猩君 阅读(758) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 24 下一页