2014年7月14日 星期一

jQuery window.opener寫法

相信跨頁傳值或控制父頁的元件都是用
 
window.opener.getElementById("abc").value  = 'abc';
那用jQeury怎麼做??
 
$('#abc', opener.document).attr("value",txt);
參考網址 點我前往

2014年7月9日 星期三

Bootstrap cannot call methods on button prior to initialization

在Bootstrap中使用button地'load'功能
 
btn.button('loading');
發生下列問題
cannot call methods on button prior to initialization
網路查了一下,主要是jQuery UI的js檔錯誤,
檢查一下jquery ui的js是不是放於bootstrap的js上面

2014年7月3日 星期四

c# Parameters.AddWithValue DBNull

在Inser or Update時難免遇到的問題
第一個想法會寫個function來判斷DBNull 或是文字
或者是用三元運算子
今天看到更短的寫法順便學一下
 
cmd.Parameters.AddWithValue("@abc", (object)item.abc ?? DBNull.Value);
參考網址
點我前往