2014年2月20日 星期四

jQuery 抓取table tr td 的值

很簡單的語法相當實用

         $(function () {
             $('table > tbody > tr').each(function () {
                 var mWord = $.trim($(this).find("td:eq(1)").text()); //1是抓取第二欄的文字
                
             });
         });     

2014年2月18日 星期二

Asp.net ListView Button RowIndex

先在ListView中放一個Button
  
寫code
        protected void Button1_Click(object sender, EventArgs e)
        {            
            ListViewItem listviewitem = (ListViewDataItem)((Button)sender).NamingContainer;
            int RowIndex = listviewitem.DataItemIndex;//第幾的RowIndex 從0開始喔
           
        }
以上就知道是第幾筆的Button
很實用的招式

2014年2月6日 星期四

Bootstrap v3.1.0範例

最近很夯的東西
可以幫助程式設計師在沒有美編時也能做出美美的網站
官網
懶的每次都寫
所以先包好直接copy用
內含
modernizr-2.6.2.js
jquery-1.10.2.js
bootstrap.js
bootstrap-select.js
respond.js

點我下載