HTML 表單
jQuery
延伸閱讀
http://hayageek.com/jquery-ajax-form-submit/
[……]
需要用日期來篩選指定日期區間的資料,剛好看到艾倫郭寫的這一篇,用了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( … );
搞定!!
[……]
在CKEditor 4 編輯器中,設定粗體,回到前端秀出來的文字粗體、斜體、底線都沒有效果,
應該是在做前端網站設計,都習慣用reset.css來重新設置每個標籤的樣式
而在CKEditor 4 我們將某段文字設定為粗體,
切到原始碼來看,CKEditor預設將該用<strong></strong>包裹,用HTML標籤產生粗體效果,
<strong>HELLO WORLD!!</strong>
不過<strong>已經被reset.css重設了,所以在前端<strong>並起不了粗體作用,
在網路上找到一個方法,在CKEditor 4 的config.js設定檔中加上
config.coreStyles_bold = { element: ‘span’, styles: { ‘font-weight’ : ‘bold’ } };
這時候粗體就會用<span>來包裹透過CSS來產生粗體效果,而不是<strong>標籤:
<span style=”font-weight:bold;”>HELLO WORLD!!</strong>
這樣就正常顯示了粗體了,粗體、斜體、底線方法同理:
config.coreStyles_bold = { element: ‘span’, styles: { ‘font-weight’ : ‘bold’ } };
config.coreStyles_italic = { element: ‘span’, styles: { ‘font-style’ : ‘italic’ } };
config.coreStyles_underline = { element: ‘span’, styles: { ‘text-decoration’ : ‘underline’ } }
若有更好的作法再請各位大大提出囉~^^
自己的題目自己解
使用reset.css來重設所以HTML預設樣式
有reset就有unreset就是反重設HTML預設樣式
跟reset.css一樣,網路上有流傳很多版本,
可以參考一下下列網址版本。
https://github.com/binarystash/unreset-css
其優點是他有設定class,也就是說我可以指定容器的去做反重設HTML預設樣式的動作
這樣就OK囉~這樣即使是使用<stong>也一樣有效果
[……]
因為目前裝置已經不只有電腦,可能有電腦、平板及手機,如何去判別user的瀏覽器然後給予不同內容,這樣的功能變得非常重要,今天發現了一個很簡單的方法~用網友寫好的Mobile Detect class來做判斷,官網在下方,
http://mobiledetect.net/;
那斷的方式也很簡單~
範例如下~
延伸閱讀
http://blog.wingzero.tw/2014/09/php.html
[……]