功力進步
https://xyz.cinc.biz/2013/05/mysql-transaction.html
https://stackoverflow.com/questions/30973002/try-catch-in-mysql-for-transaction
MyISAM to InnoDB
http://carlislebear.blogspot.com/2015/03/mysql-difference-between-MyISAM-and-InnoDB.html
資料庫分區
http://fecbob.pixnet.net/blog/post/39084675-說說mysql分區
PHP jquery Note
哀踢人
2019年3月25日 星期一
2019年1月9日 星期三
jqueryui datepicker 限制 range 在六個月內
$("#shipping_startdate").datepicker({
dateFormat:"yy-mm-dd",
onClose: function( selectedDate ) {
var date = new Date(Date.parse(selectedDate.replace(/-/g,"/")));
var newdate = new Date(date.setMonth(date.getMonth()+6));
$( "#shipping_endate" ).datepicker( "option", "minDate", selectedDate );
$( "#shipping_endate" ).datepicker( "option", "maxDate", formatDate(newdate) );
}
});
$("#shipping_endate").datepicker({
dateFormat:"yy-mm-dd",
onClose: function( selectedDate ) {
var date = new Date(Date.parse(selectedDate.replace(/-/g,"/")));
var newdate = new Date(date.setMonth(date.getMonth()-6));
$( "#shipping_startdate" ).datepicker( "option", "minDate", formatDate(newdate) );
$( "#shipping_startdate" ).datepicker( "option", "maxDate", selectedDate );
}
});
有點小小麻煩所以做個紀錄
2017年10月19日 星期四
jquery-lang-js 翻譯檔裡面若有 '< br >' 無法顯示出來
所以我改寫了一些東西
$(function () {
// Setup data on the language items
self._start();
// Check if the current language is not the same as our default
if (currentLang && currentLang !== self.defaultLang) {
// Switch to the current language
self.change(currentLang);
}
self.parseHTML();
});
$(".parseHTML").each(function(){
var html = $.parseHTML($(this).text());
$(this).empty();
$(".parseHTML").append(html);
})
}
有特殊標籤的加上 parseHTML 這個class
就行了
$(function () {
// Setup data on the language items
self._start();
// Check if the current language is not the same as our default
if (currentLang && currentLang !== self.defaultLang) {
// Switch to the current language
self.change(currentLang);
}
self.parseHTML();
});
$(".parseHTML").each(function(){
var html = $.parseHTML($(this).text());
$(this).empty();
$(".parseHTML").append(html);
})
}
有特殊標籤的加上 parseHTML 這個class
就行了
2015年4月9日 星期四
自訂事件送到 iframe 裡面
因為 iframe 是為一個新的document 所以需要一些方法把事件送進去
index.html
ifame.html
index.html
$(document).contents().trigger( "scan_mode_event", [currentMode] );
ifame.html
parent.$(parent.document).bind( "scan_mode_event", function(event, currentMode){
if(currentMode==2){
$("#ppoe_option").show();
}else{
$("#ppoe_option").hide();
}
})
2014年10月21日 星期二
jquery 顯示繼承效果
var Super = {
a: function() {
console.log("old")
},
b:function(){
console.log("show a");
}
};
var Superb = {
a: function() {
console.log("new");
}
};
var Sub = $.extend(Super, Superb);
Sub.a();
Sub.b();
2014年8月4日 星期一
訂閱:
意見 (Atom)
