自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(52)
  • 收藏
  • 关注

转载 select2默认选择值

$(document).ready(function() { var data = [{ id: 0, text: 'aaa' }, { id: 1, text: 'bbb' }, { id: 2, text: 'ccc' }]; $(".js-example").select2({ data: data, placeholder: "请选择

2017-01-19 13:46:13 19040 1

原创 golang获取并解析ajax请求参数(带数组)

前台代码:(category是数组)var data = { title: title, category: category.split(","), cancomment: cancomment, content: content, totalWords: totalWords }; $.ajax({ type: "POST", url:

2017-01-19 10:25:23 11558

原创 go判断两个字符串是否是是相互打乱的,也就是说它们有着相同的字符,但 是对应不同的顺序。

package mainimport ( "fmt" "strings" "unicode/utf8")func main() { fmt.Println(string([]rune("starting chat...")[2])) fmt.Println(string([]rune("你好,世界!")), []byte("你好,世界!")) fmt.Println("你好,

2017-01-13 14:35:56 1637 4

原创 ie发送ajax问题,get请求

var data = { "orgIds": undefined, "dateFrom": dateFrom || beginTime || timeObj.begin, "dateTo": dateTo || endTime || timeObj.now, "interval":periodType.toLocaleLowerCase(),

2017-01-12 14:20:28 1161

原创 casperjs

var casper = require('casper').create();casper.start('http://blog.csdn.net/kiwi_coder?viewmode=list', function() { this.click('#btnContents a');});casper.then(function() { this.capture('baidu-

2016-11-15 22:58:22 393 1

转载 golang的缓冲channel和无缓冲channel的区别

golang channel 有缓冲 与 无缓冲 是有重要区别的我之前天真的认为 有缓冲与无缓冲的区别 只是 无缓冲的 是 默认 缓冲 为1 的缓冲式其实是彻底错误的,无缓冲的与有缓冲channel有着重大差别那就是一个是同步的 一个是非同步的怎么说?比如c1:=make(chan int)        无缓冲c2:=make(chan int,1

2016-10-07 18:58:27 7313

原创 使用antd创建一个3级联动菜单栏

Index.jsximport '../common/lib';import App from '../component/App';import ReactDOM from 'react-dom';import React from 'react';import { Link } from 'react-router';import { Router, Route, Redire

2016-06-08 13:07:18 14369 1

原创 一个最简单的react-router设置

index,jsx(入口文件)import '../common/lib';import App from '../component/App';import ReactDOM from 'react-dom';import React from 'react';import { Link } from 'react-router';import { Router, Route,

2016-06-07 17:38:11 4099

原创 golan的template包中的eq函数的用法

{{define "header"}} {{.Index}} {{.Article}} {{.Favourite}} {{.Write}} {{.AboutMe}} {{if eq .Opt "登录"}} {{.Opt}} {{else}} {{.Opt}} {{end}} {{end}}

2016-06-04 21:17:05 2462

原创 最简单的antd的index.jsx的路由配置

import '../common/lib';import Home from '../component/home/Home';import ReactDOM from 'react-dom';import React from 'react';import { Router, Route, Redirect, IndexRoute, hashHistory } from 'react-

2016-06-01 17:51:46 3122

原创 antd循环输出

import React, {Component} from "react";import { Menu, Icon } from 'antd';import navCfg from "../../navCfg";const SubMenu = Menu.SubMenu;class RightMenu extends Component { constructor(props

2016-05-24 16:07:50 6128

原创 自适应的导航条

(function($) { function resize() { // 左侧高度 var leftHeight = $(window).height(); $(".left-content").css("height", leftHeight); // 右侧宽度 var scrollWidth = getScrollbarWidth(); var leftWidt

2016-05-23 12:07:39 2111

原创 reactJS的return里面不要有分号

return ( 飞马信息平台ifim { ss.map(function(s, i) { return (

2016-05-18 15:03:24 3402

转载 Sublime Text 3 快捷键总结(拿走)

以下是个人总结不完全的快捷键总汇,祝愿各位顺利解放自己的鼠标。选择类Ctrl+D 选中光标所占的文本,继续操作则会选中下一个相同的文本。Alt+F3 选中文本按下快捷键,即可一次性选择全部的相同文本进行同时编辑。举个栗子:快速选中并更改所有相同的变量名、函数名等。Ctrl+L 选中整行,继续操作则继续选择下一行,效果和 Shift+↓ 效果一样。Ctrl+S

2016-04-25 14:26:15 334

原创 doT.js初学代码

component test td { width: 150px; height: 50px; text-align: center; } .values { display: none; width: 100px; } 姓名

2016-04-25 14:11:05 1902

原创 凹凸按钮样式

.function-block a.disabled-link { background-color: #456686; box-shadow: inset 0px 2px 8px 2px #292929; cursor: default;}.function-block { min-width: 130px; float: left; background-color: #ff

2016-04-19 17:11:32 1392

原创 图片高度自适应

//图片自适应 function adjustImg() { var helpWidth = document.body.clientWidth; if(helpWidth >= 1920) { var helpBannerHeight = 255 / 1920 * helpWidth; $("#help-banner").css("height", helpBannerHe

2016-03-25 10:43:06 502

原创 使背景图片不缩放水平居中样式

#help-banner { position:relative; overflow: hidden; background-image: url(../../../img/front/frontHome/help/banner.png); height: 255px; background-position-x: 50%;}

2016-03-21 11:09:45 2188

原创 限制输入框只能输入11位数字

输入框限制: // 限制手机号最多只能输入11位 $("#phone-id").keydown(function(event) { var reg = /^\d{11}$/; var value = $(this).val(); var e = event || window.event || arguments.callee.caller.arguments[0];

2016-03-17 16:16:50 15583 1

原创 js判断浏览器是否有滚动条

不多说,直接贴代码:// 判断是否有滚动条 var isScroll = function (el) { // test targets var elems = el ? [el] : [document.documentElement, document.body]; var scrollX = fal

2016-03-15 21:10:48 2265

原创 golang中的坑

package mainimport ( "fmt")func main() { t1 := []int32{1, 2, 3} fmt.Println(printSelf(t1)) fmt.Println(t1) fmt.Println("................................") t2 := &[]int32{1, 2, 3} fmt.Pri

2016-03-06 11:44:31 1182

原创 一个火箭滑动到页面顶部插件

$(function() { var e = $("#rocket-to-top"), t = $(document).scrollTop(), n, r, i = !0; $(window).scroll(function() { var t = $(document).scrollTop(); t == 0 ? e.css("background-position") ==

2016-03-04 17:45:21 551

原创 html5的input标签的pattern正则匹配问题

错误的写法(中间多了空格):正确的写法(3和7之间无空格):

2016-02-25 12:40:18 11087 3

原创 创建手机页面弹出键盘的时候背景图片被挤上去的解决办法

RT,想让背景图片全部覆盖页面而又不会因为输入时弹出键盘挤压背景图片的话,可以将height: 100%改为min-height:100%哈哈。

2016-02-18 15:09:26 9441 6

原创 如何判断用户用哪种终端程序打开页面

var iOS; var isWechat; var isAndroid; var retina; var userType = {}; // ios if (navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad)/)) { iOS = true;

2016-02-16 14:18:53 734

原创 css渐变按钮等

welcome .normal-input { border:none; outline: none; } .bar { position: relative; height: 1px; width: 100%; } .bar:before { position: absolute; bottom: -1px;

2016-01-18 15:08:47 437

原创 瀑布流

没实践过,不知道有效否 瀑布流布局 * { margin: 0; padding: 0; list-style: none; } .wrap { width: 100%; margin: 0 auto; } .wrap h2 { height: 60px; line-height: 60px; backgroun

2016-01-08 16:36:47 503

转载 前端的一些链接

http://www.w3cfuns.com/notes/18307/28e62cd92f6bdc1975805e2ba4a8ac46http://www.w3cfuns.com/notes/18383/8226916928ab8696aa843c14a330bf82

2016-01-08 16:14:50 372

转载 发送验证码计时器

http://www.cnblogs.com/steed-zgf/archive/2012/02/03/2336984.html

2015-12-24 15:31:33 557

原创 定时器,获取验证码

// 点击获取验证码 $(".get-it").click(function(event) { var timestampStart=new Date().getTime() + 6000; $(".get-it").css("background-color", "gray").attr("disabled", true); var interval = setInterval(f

2015-12-18 16:34:48 996 3

原创 按钮的样式

市场 全国 当前报价日期  2015-12-01 周二 纸票 电票 小纸票 小电票 商票 机构 国股 商行 三农 机构 国股 商行

2015-12-03 16:41:55 672

转载 安装express及配置

原文地址: http://cwind.iteye.com/blog/2216452Nodejs简介Node.js 基于 Chrome JavaScript 运行环境,用于便捷地搭建快速、可扩展的网络应用。它使用了一个事件驱动、非阻塞式 I/O 的模型,使其轻量又高效,非常适合于运行在分布式设备的数据密集型实时应用。当前版本:v0.12.4

2015-11-23 21:24:49 472

原创 自己做的最简单的轮播图

/*-------------------定义函数---------------------*/ //轮播图 changeImg = function(){ var index = $(".focus > a.active").index(); if (index === 3 || index ===-1) { index = 0; } $(".focus > a").

2015-11-16 15:50:55 1209

转载 创建jQuery插件示例

点击打开链接

2015-10-27 16:00:20 330

原创 关于滑动切换页面swiper的坑

我们的页面结构必须严格按照官方的标准: Slide 1 Slide 2 Slide 3 ... 看见swiper-container类了吗,他必须是区域的顶层元素即他应该是body的子元素,而

2015-10-27 14:31:17 20740 1

转载 jQuery.extend 函数详解

点击打开链接

2015-10-22 21:23:37 364

转载 js验证集合

/******************************************************************************* * jQuery Validate扩展验证方法 ******************************************************************************/define( [ '

2015-10-10 13:32:01 594

转载 golang -- 时间日期总结

http://my.oschina.net/1123581321/blog/190942

2015-08-19 22:05:37 321

原创 jQuery中事件的解除问题

如果在开发中出现了页面和文件重复加载严重导致网页运行缓慢的问题时,要注意已经添加的事件是否解除了绑定。使用unbind()来解除绑定,例如://左侧tab切换 $("html").unbind().on("click", ".left-nav > li", function(event){ var index=$(this).index(); var dateTime = new

2015-08-05 09:39:42 374

原创 使用brackets编译scss文件

over

2015-07-11 23:22:02 1249 2

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除