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 { | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ | |
filter: gray; /* IE6-9 */ | |
-webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */ | |
} |
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 qq_msg_sender { | |
private $qq_num; | |
private $qq_pw; | |
private $sid; | |
public function __construct($qq_num,$qq_pw){ | |
$this->qq_num = $qq_num; | |
$this->qq_pw = $qq_pw; | |
} |
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> <style type="text/css"> #a { margin:0 10px 10px; } #b { width:100%; } </style> <title>IE Crasher</title> </head> <body> <table><tr><td> <div id="a"> <form id="b"> <input type="text" name="test"/> </div> </td><td width="1"></td></tr></table> </body></html> |
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
function pheader($string,$exit=true,$replace = true, $http_response_code = 0) { | |
$host = $_SERVER['HTTP_HOST']; | |
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); | |
$string = str_replace(array("\r", "\n"), array('', ''), $string); | |
if(empty($http_response_code) || PHP_VERSION < '4.3' ) { | |
@header("Location: http://$host$uri/$string", $replace); | |
} else { | |
@header("Location: http://$host$uri/$string", $replace, $http_response_code); | |
} | |
if($exit) { |
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
document.body.appendChild(document.createElement('script')).src='http://code.jquery.com/jquery-1.9.1.min.js'; |
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, body {width:100%;} | |
.father-div {width:960px;} | |
.child-div {width:auto;padding:10px;} |
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
全屏模式: shift + F11 或 直接 F11 | |
注释/反注释:ctrl + / | |
打开控制面板: ctrl+shift+p | |
打开操作命令行: ctrl + ` | |
移动到指定行:ctrl + p 输入 :xxx | |
定位到选中的文字的下一处: ctrl + 依次按下 k 、d | |
在光标行后插入空行: ctrl + enter | |
定位匹配字符(如左括号匹配右括号): ctrl + m | |
选中匹配字符间的字符:ctrl + shift + m | |
函数跳转:ctrl + r 输入函数名 |
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
// <form method="post" autocomplete="off" action="#" enctype="multipart/form-data"> | |
// <input name="pic" id="pic" type="file" /> | |
// </form> | |
// 文件数组格式 'pic' 为input name属性 | |
$_FILES['pic'] = | |
array( | |
[name] => Balloon.bmp | |
[type] => image/bmp | |
[tmp_name] => C:\Windows\Temp\phpF4CC.tmp |
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
function addCss(cssPath){ | |
var newCss=document.createElement("link"); | |
newCss.setAttribute("rel", "stylesheet"); | |
newCss.setAttribute("type", "text/css"); | |
newCss.setAttribute("href", cssPath); | |
document.getElementsByTagName("head")[0].appendChild(newCss); | |
} | |
function removeCss(cssName){ | |
var link=document.getElementsByTagName("link"); |
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
<script type="text/javascript" src="./static/js/jquery-1.6.4.min.js"></script> | |
<script type="text/javascript" src="./static/js/ajaxfileupload.js"></script> | |
<input name="pic" id="pic" type="file" /> | |
function ajaxFileUpload(){ | |
jq('input[name="pic"]') | |
.ajaxStart(function(){ | |
jq('span.pic-up-notice').html('<img src="./static/image/common/loading.gif" />图片上传ing...'); | |
}) | |
.ajaxComplete(function(){ | |
jq('span.pic-up-notice').html('图片上传完成!<a class="reedit-pic" href="#">修改图片</a>'); |
OlderNewer