Time of Update: 2018-12-07
文章目錄 .test() 定義 RegExpRegExp 對象用於儲存檢索模式。通過 new 關鍵詞來定義 RegExp 對象。以下代碼定義了名為 patt1 的 RegExp 對象,其模式是 "e":var patt1=new RegExp("e");功能 : 尋找的是字元 "e".或者使用正則表單式:var reg =new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9
Time of Update: 2018-12-07
SQL Server 中時間比較例子:select count(*) from table where DATEDIFF([second], '2004-09-18 00:00:18', '2004-09-18 00:00:19') > 0說明 select DATEDIFF(day, time1 , time2) 對應樣本語句如下 select DATEDIFF(day, '2010-07-23 0:41:18', '2010-07-23
Time of Update: 2018-12-07
ul 水平,行內塊放置<style type="text/css">ul.ul_inline {display: inline-block;list-style: none;border: 0;width: 350px;margin: 0;padding: 0;overflow: hidden; /* 超過範圍隱藏 */white-space: nowrap; /* 不斷行 */list-style-type:none;}ul.ul_inline li{display:
Time of Update: 2018-12-07
/* input 和 textarea 最大文字限定外掛程式 * 修改版, 一個中文表示1一個字, 一個英文半個字; * TextLimit - jQuery plugin for counting and limiting characters for input and textarea fields * * pass '-1' as speed if you don't want the char-deletion effect. (don't just put 0) *
Time of Update: 2018-12-07
廢話不多直接貼代碼前台代碼:<asp:Repeater ID="Repeater3" runat="server"> <ItemTemplate> <div class="line_item" ><a href="line.aspx?line_id=<%#Eval("id") %>"><%#Eval("title") %></a><span style="
Time of Update: 2018-12-07
var obj=$("#xiaozhangPic")[0];var filepath =""; if (window.navigator.userAgent.indexOf("MSIE") >= 1) { obj.select(); filepath = document.selection.createRange().text;} else if (window.navigator.userAgent.indexOf("Firefox") >= 1) { if (
Time of Update: 2018-12-07
js,jQuery 排序的實現:重點: 想要實現排序,最簡單的方法就是 先把標籤用jQuery讀進對象數組用js排序好對象數組 (針對對象數組進行排序, 不要試圖直接對網頁的內容進行直接更改)用對象數組內容覆蓋網頁上的標籤數組;//排序從文字短的到長的 var arr_a=new Array(); var i=0; $(".type_list_txt >
Time of Update: 2018-12-07
JS 時間格式化函數//時間格式化函數Date.prototype.format = function (format) {var o = {"M+": this.getMonth() + 1, //month"d+": this.getDate(), //day"h+": this.getHours(), //hour"m+": this.getMinutes(), //minute"s+": this.getSeconds(), //second"q+": Math.floor((this.
Time of Update: 2018-12-07
擷取當前類得位置以及方法名StackTrace st = new StackTrace(new StackFrame(true));Console.WriteLine(" Stack trace for current level: {0}", st.ToString());StackFrame sf = st.GetFrame(0);Console.WriteLine(" File: {0}", sf.GetFileName());Console.WriteLine(" Method: {0}
Time of Update: 2018-12-07
缺點: 1.會產生髒讀 2.只適用與select查詢語句優點: 1.有些檔案說,加了WITH (NOLOCK)的SQL查詢效率可以增加33%。 2.可以用於inner join 語句髒讀: 一個使用者對一個資源做了修改,此時另外一個使用者正好讀取了這條被修改的記錄,然後,第一個使用者放棄修改,資料回到修改之前,這兩個不同的結果就是髒讀。詳細內容: 要提升SQL的查詢效能,一般來說大家會以建立索引(index)為第一考慮。其實除了index的建立之外,當我們在下SQL Command時,
Time of Update: 2018-12-07
ViewState 只在進行表單提交是才有用.ViewState 在用戶端的表現形式 只是一個隱藏欄位.隱藏欄位<input type="hidden" name="__VIEWSTATE" value=""> 使用方法private void Page_Load(object sender, System.EventArgs e){ViewState["myvalue"] =
Time of Update: 2018-12-07
文章目錄 Count/Sum/Min/Max/Avg操作符 1. 常用查詢:var q = from c in db.Customers where c.City == "London" select c.ContactName;注: select 一定要放在後面 db.Customers 是資料來源c 是Customers 數組中的一個where 條件陳述式select 返回內容, 例如: select
Time of Update: 2018-12-07
<script type="text/javascript"> //滾動外掛程式 (function ($) { $.fn.extend({ Scroll: function (opt, callback) { //參數初始化 if (!opt) var opt = {}; var _this = this.eq(0).find("#scrollDivContent:first"); var lineH =
Time of Update: 2018-12-07
////使用方法//$(文本域選取器).insertContent("插入的內容");//$(文本域選取器).insertContent("插入的內容",數值); //根據數值選中插入常值內容兩邊的邊界, 數值: 0是表示插入文字全部選擇,-1表示插入文字兩邊各少選中一個字元。////在游標位置插入內容, 並選中(function($) { $.fn.extend({ insertContent: function(myValue, t) { var $
Time of Update: 2018-12-07
var exp = null;if (!exp)如果 exp 為 undefined,或數字零,或 false,也會得到與 null 相同的結果,雖然 null 和二者不一樣。注意:要同時判斷 null、undefined、數字零、false 時可使用本法。var exp = null;if (!exp && typeof exp != "undefined" && exp != 0){ alert("is null");}typeof exp !=
Time of Update: 2018-12-07
在Repeater 中使用Repeater的方法前台代碼:<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound"> <ItemTemplate> <div class="nav_title"> <%#Eval("class") %></div>
Time of Update: 2018-12-07
文章目錄 SQL Server 2005 的新特性Row_Number()函數 SQL Server 2005 的新特性Row_Number()函數文法:ROW_NUMBER() OVER(PARTITION BY COLUMN ORDER BY COLUMN) 例子: select * from ( select *, ROW_NUMBER() OVER(Order by a.CreateTime DESC ) AS
Time of Update: 2018-12-07
判斷是否存在資料if exists( select * from Hong_PageConfig where names='name' ) Begin print '1' Endelse Begin print '0' End --------------- -- 判斷要建立的表名是否存在 if exists (select * from dbo.sysobjects where id = object_id(
Time of Update: 2018-12-07
//圖片大小自動指令碼 function AutoResizeImage(maxWidth, maxHeight, objImg) { var img = new Image(); img.src = objImg.src; var hRatio; var wRatio; var Ratio = 1; var w = img.width; var h = img.height;
Time of Update: 2018-12-07
<ul class="ul_inline" > <li><input type="checkbox" name="checkbox_color" value="白" />白</li> <li><input type="checkbox" name="checkbox_color" value="紅" />紅</li> <li><input type="checkbox"