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
<div it="gotop"> </div> | |
<script> | |
backTop = function (btnId){ | |
var btn = document.getElementById(btnId); | |
var d = document.documentElement; | |
var b = document.body; | |
window.onscroll = btnDisplay; | |
btn.onclick = function (){ | |
btn.style.display = "none"; | |
window.onscroll = null; |
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
<?php if ($username == 'sally'): ?> | |
<h3>Hi Sally</h3> | |
<?php elseif ($username == 'joe'): ?> | |
<h3>Hi Joe</h3> | |
<?php else: ?> |
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> | |
<head> | |
<title>...</title> | |
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> | |
</head> | |
</html> | |
<a href="signin.php" rel="nofollow">sign in</a> | |
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
<?php | |
$guideWord=get_post_meta($post->ID, "guide_word_value", $single = true); | |
$buttonUrl=get_post_meta($post->ID, "custom_button_url_value", $single = true); | |
?> | |
<?php if (!empty ($guideWord)) {echo $guideWord ;} else {echo "If you like it, please rate us" ;} | |
?> |
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).on('click','a',function(e){ | |
var _this = $(e.target); | |
if(_this.attr('href') != undefined && $(_this).attr('href')!='javascript:void(0);'){ | |
try{ | |
window.external.MyInvoke(); | |
} | |
catch(e){ | |
} | |
} | |
}) |
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
function checkFirstImg(){ | |
$('<img/>').attr('src',$(imgChecked).attr('src')).load(function(){ | |
firstImg_real_width=this.width; | |
firstImg_real_height=this.height; | |
console.log('宽度'+firstImg_real_width); | |
}) | |
} |
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
" 基础 | |
syntax on | |
set ai | |
set history=100 | |
set hlsearch " 高亮搜索结果 | |
filetype plugin on | |
set number "显示行数 | |
set cursorline | |
set foldenable | |
set foldmethod=syntax |
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
cd /var/www/htdocs/ | |
$ git clone --bare /path/to/git_project gitproject.git | |
$ cd gitproject.git | |
$ mv hooks/post-update.sample hooks/post-update | |
$ chmod a+x hooks/post-update | |
$ git update-server-info #最后还要执行一下才行 |
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
white-space: nowrap; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
width: 100px;//需要设置一个宽度 | |
//多行文字,最后一行省略号 | |
overflow:hidden; | |
text-overflow:ellipsis; | |
display: –webkit-box; | |
-webkit-line-clamp: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
document.onkeydown = function(e) { | |
// 兼容FF和IE和Opera | |
var theEvent = e || window.event; | |
var code = theEvent.keyCode || theEvent.which || theEvent.charCode; | |
var activeElementId = document.activeElement.id;//当前处于焦点的元素的id | |
if (code == 13 && activeElementId == "search_text") { | |
search();//要触发的方法 | |
return false; | |
} | |
return true; |