This file contains hidden or 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 hidden or 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
document.getElementsByTagName('*').length 可以查看DOM元素的数量 | |
前端开发的出品建议: | |
1、页面能够通过http://validator.w3.org的验证,当然css希望也能通过http://jigsaw.w3.org/css-validator/validator难证,不过有时候由于需要兼容多浏览器,会受到hack的影响,css不做强制要求。 | |
2、静态页面应该能够通过yslow2.0的classic(V1)级别的检测,检测的结果我觉得应该得到A。 | |
3、背景图片保证不超过3个以上,css文件不超过2个,js文件不超过3个。而且良好的遵守web标准的一些规定,css放到head中,js文件放到</body>之前或者之后。 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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:[email protected] | |
Author URL: http://weibo.com/920802999 | |
Version: 1.0 | |
UpdateTime:2013-12-5 | |
*/ | |
//刷新图片验证码 |
This file contains hidden or 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
/***** Selector Hacks ******/ | |
/* IE6 and below */ | |
* html #uno { color: red } | |
/* IE7 */ | |
*:first-child+html #dos { color: red } | |
/* IE7, FF, Saf, Opera */ | |
html>body #tres { color: red } | |
/* IE8, FF, Saf, Opera (Everything but IE 6,7) */ | |
html>/**/body #cuatro { color: red } | |
/* Opera 9.27 and below, safari 2 */ |
This file contains hidden or 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
//邮箱验证纯javascript | |
function checkEmail(emailStr){ | |
var start=0; | |
var end=emailStr.length; | |
while(start<end){//判断是否含有除"@"和"."之外的特殊字符和中文字符 | |
var charcode=emailStr.charCodeAt(start); | |
if(!(charcode==45||charcode==46|| | |
(charcode>=48&charcode<=59)|| | |
(charcode>=64&charcode<=90)|| (charcode>=97&charcode<=122))){ |
This file contains hidden or 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样式表中,合理有序的命名同样可以为整个CSS工作带来意想不到的简便。 | |
为了更加符合搜索引擎的规范, 下面是一些常用的CSS代码命名标准。 | |
页头: header (CSS中通常写为: #header) | |
登录条: loginBar | |
标志: logo | |
侧栏: sideBar | |
广告: banner |
This file contains hidden or 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
//1———————原生js的写法——— | |
// document.getElementsByClassName("btn") | |
// document.getElementById("btn") | |
// document.getElementsByTagName('div') 查找 | |
//原生js在获取dom元素时,除了document.getElementById()外,其他的方式都会得到一个数组。然后用for循环遍历这个数组的时候,如果对数组里面的元素进行的操作是查找时候的条件或者是删除了这个dom元素,那么这个元素会从数组里面自动移除掉。 | |
window.onload = function() { | |
document.getElementById("btn").onclick = function() { | |
Test(); | |
} |