[……]
作者: ann71727
CSS 刪除線
SQL GROUP BY SUBSTR 用分割字串來群組資料
例如:
2014(年)+001(款號)+01(規格) = 201400101(產品編號)
此時我們會希望用款號來把相同款式的商品群組起來,秀一筆就好,GROUP BY可以搭配SUBSTR()來實現這效果,實際實作方式如下
[……]
CSS 按鈕滑入、滑出、按下、停用樣式 input button css style hover click disable
:focus // 焦點
:active // 按下
:hover // 滑出
:disabled // 停用
<style type=”text/css”>
/* 原始 */
input[type=”button”]{
background:#F00;
border:2px solid #F00;
padding:10px;
}
/* 滑入 */
input[type=”button”]:hover{
background:#0F0;
background:inherit;
}
/* 按下 */
input[type=”button”]:active{
background:#00F;
background:inherit;
}
/* 焦點 */
input[type=”button”]:focus{
border:2px solid #00F;
background:inherit;
}
/* 停用 */
input[type=”submit”]:disabled{
background:#EBEBEB;
border:2px solid #ccc;
color:#999;
padding:10px;
}
</style>
<input type=”button” name=”button” id=”button” value=”正常按鈕” />
<input type=”submit” name=”button” id=”button” value=”停用按鈕” disabled=”disabled” />[……]
jQuery disable 元素,啟用、停用
// 元素停用
$(‘.select’).attr(‘disabled’, ‘disabled’);
// 元素啟用
$(‘.select’).removeAttr(‘disabled’);[……]
fancybox plugin 自適應iframe內容尺寸 fancybox iframe auto width height
fancybox plugin 自適應iframe內容尺寸 fancybox iframe auto width height
本篇使用 jquery-1.11.0 & fancyBox-v2.0.6 請先確認您的版本
jQuery代碼如下,主要是為fancybox加上beforeShow事件的callback,在iframe頁面載入後去抓其內容的寬度及高度。
重點在這 – iframe中的頁面一定要定義其 <html>及<body>的寬度、高度,高度可設為auto
範例如下,將下列代碼置於<head>及<body>中間,父頁面才有辦法去抓到頁面的寬度,以設定ifreme的尺寸
<style type=”text/css”>
/* iframe 頁面 */
html,body{
margin:0;
padding:0;
width:700px;
height:auto;
}
</style>[……]
SQL 繁體中文參考手冊 – 非常詳細 – 學SQL必備 – 教學必備
jQuery 繁體中文參考手冊 – 非常詳細 – 學jQuery必備 – 教學必備
jQuery 篩選自定屬性 filter attr
jQuery 篩選自定屬性 filter attr
$(“a[uid=^'”+id+”‘]”);
$(‘a’).filter( “[uid=^'”+id+”‘]” ));
[……]