I hereby claim:
- I am pizzaliu on github.
- I am pizzaliu (https://keybase.io/pizzaliu) on keybase.
- I have a public key ASDg0gjmJHXQHm0lgZAUHD006VD3uP1AsD90ca3SU7yMZAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<a href="#" title="添加到收藏夹" onclick="javascript:AddFavorite();">添加到收藏夹</a> | |
<a href="#" title="设为主页" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage(window.location.href);">设为主页</a> | |
function AddFavorite(){ | |
var url = window.location.href,tit=document.title; | |
try{window.external.addFavorite(url, tit);} | |
catch (e){ | |
try {window.sidebar.addPanel(tit, url, "");} | |
catch (e){alert("无法自动添加到收藏夹,请 Ctrl + D 手动添加");} | |
} | |
}; |
(function() { | |
var backToTopTxt = "返回顶部", backToTopEle = $('<div class="backToTop tops"></div>').appendTo($("body")) | |
.text(backToTopTxt).attr("title", backToTopTxt).click(function() { | |
$("html, body").animate({ scrollTop: 0 }, 520); | |
}), | |
backToTopFun = function() { | |
var st = $(document).scrollTop(), winh = $(window).height(); | |
(st > 0)? backToTopEle.show(): backToTopEle.hide(); | |
//IE6下的定位 | |
if (!window.XMLHttpRequest) { backToTopEle.css("top", st + winh - 60); } |
html, | |
body { | |
height:100%; | |
overflow-x:hidden; | |
overflow-y:auto; | |
} | |
.fixed-box { |
<?php | |
/* | |
保存密码 | |
http://www.openwall.com/phpass/ | |
*/ | |
// 包含phpass库 | |
require_once('phpass-0.3/PasswordHash.php'); | |
// 初始化散列器为不可移植(这样更安全) | |
$hasher = new PasswordHash(8, false); |
<script type="text/javascript" src="./static/js/ajaxfileupload.js"></script> | |
<link href="datepicker.css" rel="stylesheet"> | |
<input name="outdate" id="outdate" type="text" /> | |
jq('#indate').DatePicker({ | |
mode:'single', | |
calendars:1, | |
format:'Y年m月d日', | |
starts:1, | |
date: current_date, | |
current: current_date, |
<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>'); |
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"); |
// <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 |
全屏模式: shift + F11 或 直接 F11 | |
注释/反注释:ctrl + / | |
打开控制面板: ctrl+shift+p | |
打开操作命令行: ctrl + ` | |
移动到指定行:ctrl + p 输入 :xxx | |
定位到选中的文字的下一处: ctrl + 依次按下 k 、d | |
在光标行后插入空行: ctrl + enter | |
定位匹配字符(如左括号匹配右括号): ctrl + m | |
选中匹配字符间的字符:ctrl + shift + m | |
函数跳转:ctrl + r 输入函数名 |