This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delete操作符(一) | |
Published by 陈漫凯 | on March 19, 2012 | Posted in 豆知识 | |
这里想分享的是,一个大家可能挺熟悉,却挺少用的操作符,delete操作符。 | |
什么是delete操作符 | |
delete操作符,可以用于删除对象的属性,或者数组的某个值,如果删除成功则返回true。 | |
语法 | |
delete一元表达式 | |
很简单的语法,可以这样使用 | |
/* 代码片断1 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> | |
<title>简单的jquery插件写法之一</title> | |
</head> | |
<body> | |
<ul id="catagory"> | |
<li><a href="#">jQuery</a></li> | |
<li><a href="#">html5</a></li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*----------------------------css-----------------------------------*/ | |
<style type="text/css"> | |
body{background: #000} | |
body,img{margin: 0;padding: 0} | |
.box{padding: 20px;} | |
.box .col{width: 214px;margin-right: 15px;float: left;} | |
.box a{display: block;padding: 5px;border: 1px solid #222;background-color: #000;text-decoration:none;margin-bottom: 20px;text-align: center;} | |
.box a:hover{background: #ff3b26;cursor: pointer;} | |
.box img{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 --> | |
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa --> | |
<head> | |
<meta charset='utf-8'> <!-- 声明文档使用的字符编码 --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome --> | |
<meta name="description" content="不超过150个字符" /> <!-- 页面描述 --> | |
<meta name="keywords" content=""/> <!-- 页面关键词 --> | |
<meta name="author" content="name, email@gmail.com" /> <!-- 网页作者 --> | |
<meta name="robots" content="index,follow" /> <!-- 搜索引擎抓取 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 从匹配的每个元素上,移除 一个 或 多个 或 全部class | |
* | |
* .removeClass( [className] ) | |
* className 一个或多个以空格分隔的class,这些class将被从匹配元素的class属性中溢出 | |
* | |
* .removeClass( function(index, class) ) | |
* function(index, class) 函数返回一个或多个以空格分隔的class,用于移除。 | |
* index 当前元素在匹配元素集合中的位置, class 旧class值 | |
* 核心技巧:前后加空格 + replace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<cstdio> | |
#include<iostream> | |
#include<cstring> | |
#include<cstdlib> | |
#include<algorithm> | |
#include<string> | |
#include<cmath> | |
#include<vector> | |
#include<queue> | |
#include<set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//修改ip地址 | |
vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE=eth0 | |
ONBOOT="yes" | |
BOOTPROTO=none | |
IPADDR="192.168.1.80" | |
NETMASK=255.255.255.0 | |
GATEWAY=192.168.1.1 | |
TYPE=Ethernet | |
USERCTL=no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | |
<title>CSS Hacks</title> | |
<style type="text/css"> | |
li { | |
background-color: green; | |
font-size: 1.5em; | |
font-weight: bold; | |
color: white; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jquery.regionselector2.js | |
* Description: 省市区下拉框,多级选择 | |
*/ | |
(function($) { | |
$.fn.extend({ | |
regionselector2: function(options) { | |
//A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z | |
//参数默认值 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Name: 简单表格验证 | |
Author: markyun | |
Email:markyun0802@gmail.com | |
Author URL: http://weibo.com/920802999 | |
Version: 1.0 | |
UpdateTime:2013-12-5 | |
*/ | |
//刷新图片验证码 |