取指定class標籤名
/** * VECTOR * https://vector.cool */ <script> $('.classname').get(0).tagName; $('.classname')[0].tagName; $('.classname').prop("tagName"); </script>
[……]
/** * VECTOR * https://vector.cool */ <script> $('.classname').get(0).tagName; $('.classname')[0].tagName; $('.classname').prop("tagName"); </script>
[……]
[……]
需要用日期來篩選指定日期區間的資料,剛好看到艾倫郭寫的這一篇,用了BETWEEN我覺得還蠻好用的,此篇文章也寫了好幾種方式,十分受用~
本文出自
http://www.allenkuo.com/EBook5/view.aspx?TreeNodeID=13&id=374[……]
# 限制ip 放在指定目錄裡
<Limit GET POST PUT>
order deny,allow
deny from all
allow from 114.32.147.146, 119.77.220.104
</Limit>
把上面這堆字放到.htaccess檔案中,
放到要限制僅允許ip可存取的目錄下就可以了[……]
/* 背景由下往上定位&由右往左定位 */
div{
background-image:url(test.jpg);
background-repeat:no-repeat;
background-position:right 50px bottom 50px;
}[……]
垂直水平居中 ie9+
.child {
position: absolute;
top: 50%; /* position the top edge of the element at the middle of the parent */
left: 50%; /* position the left edge of the element at the middle of the parent */
transform: translate(-50%, -50%); /* This is a shorthand of
translateX(-50%) and translateY(-50%) */
}
沿伸閱讀
[……]
if (version_compare(phpversion(), ‘5.3.10’, ‘<‘)) {
//版本不足
}
http://php.net/manual/zh/function.phpversion.php[……]
新的主機PHP版本換成5.5.9版本
原本可用的驗証碼圖驗程式跑出 E_WARNING 的 error reporting如下
imagettftext(): Could not find/open font
無法開啟字型檔,導致圖片無法正常顯示,解法如下:
在imagettftext()前加入putenv(‘GDFONTPATH=’ . realpath(‘.’));
putenv(‘GDFONTPATH=’ . realpath(‘.’));
imagettftext( … );
搞定!!
[……]