Time of Update: 2018-12-05
1、無提示關閉視窗<input type="button" onClick="window.opener = '';window.close();" value="IE6最簡單的無提示關閉視窗" >2、防止被人iframeif (top.location != self.location){ top.location.href="http://www.34do.net";}3、判斷一個對象存在不存在document.all("a")==null(不存在)4、彈出子視窗window.
Time of Update: 2018-12-05
SqlConnection con=new SqlConnection("data source=fds;uid=sa;pwd=ddda;initial catalog=hsb");con.Open(); SqlCommand scd=new SqlCommand
Time of Update: 2018-12-05
在頁面上添加一個用戶端的File Field和Image控制項,然後右擊File Field控制項,使它作為服務端的控制項運行主要實現將圖片上傳到伺服器上的一個檔案夾下(這裡的儲存圖片的檔案夾名為UpImages),而在資料庫裡儲存圖片的名稱,圖片名在上傳時改為當前的時間,這樣在圖片多的時候不至於重複而覆蓋掉原來的圖片,還控制了圖片的大小,在你選擇正確的圖片時,圖片將顯示在IMAGE控制項裡。
Time of Update: 2018-12-05
http://www.tiobe.com/index.htm?tiobe_indexJune Headline: Visual Basic 2005 is gaining momentum The TIOBE Programming Community index gives an indication of the popularity of programming languages. The index is updated once a month. The ratings are
Time of Update: 2018-12-05
<style>.kk1{ float:left; position:relative; widht:100px; border:0;}.kk2{ position:absolute; top:20px; left:20px;}</style><div class='kk1' style='z-index:50'> <div>好好學習,</div> <div class='kk2'> <table width='250
Time of Update: 2018-12-05
由於一個公司的OA上用到速查編碼,必須得到每個字的首字母,便於以後的查詢(如:開發部,則為KFB),到網上找到了一些資料,是一個預存程序。 預存程序為:CREATE proc LOG_FindCode@strName nvarchar(20), @strFindCode nvarchar(20) outputas begin declare @word nchar(1),@PY nvarchar(4000) set @PY='' while len(@strName)>0 begin
Time of Update: 2018-12-05
/// <summary> /// 截獲定長的字串 /// </summary> /// <param name="source">源字串</param> /// <param name="length">需要截獲的長度</param> /// <returns>截獲後的字串</returns>
Time of Update: 2018-12-05
在載入新頁面或離開舊頁面時,可以用 meta 標籤控制過渡效果,同樣的,DIV(或表格)標籤中也可以使用過渡效果。指令碼如下:function gos(o,cur){ o.innerHTML="此處顯示的內容" str="這是網頁過渡運用的ID中的測試" if(cur==undefined){ //淡入淡出效果 o.filters.blendTrans.duration=2 o.filters.blendTrans.apply(
Time of Update: 2018-12-05
在C#程式中由於字串本身可以看作是一個數組,所以想取一個字串中第x個字元時可以使用這樣的方法。 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->this.Label1.Text=this.TextBox1.Text.ToString()[0].ToString()+"<br>";
Time of Update: 2018-12-05
這是一個簡單的例子,在NorthWind資料庫中建立了兩張表,在後台用到了資料訪問層,所以如果要測試,必鬚根據預存程序寫一個方法去綁定DropDownList. 介面如下:1.表的建立:if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Type]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table
Time of Update: 2018-12-05
網頁過渡效果.參數說明:Page_Enter : 進入頁面Page-Exit : 離開頁面Site-Enter : 進入網站Site-Exit : 離開網站Duration : 過渡速度Transition : 效果混合 (淡入淡出)<meta http-equiv="Page-Enter" content="blendTrans(Duration=2.0)">盒狀收縮<meta http-equiv="Page-Enter" content="reveal
Time of Update: 2018-12-05
以下的例子是如何將圖片儲存到資料庫,所用的Northwind資料庫,在裡面建一張表 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UpImage]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[UpImage] GO CREATE TABLE [dbo].
Time of Update: 2018-12-05
因為.net的基本正則文法和Perl5基本相同,所以基本文法你可以去下載一下M$的JS協助文檔,上面有詳細的說明\d表示什麼,{,5}表示什麼,\[表示什麼……,這裡我只想提醒大家一點,為了避免和反向引用相衝突,在你用\nn表示八進位的ASCII碼時,請在\後加0,就是說,\40在表示ASCII碼時,請這樣寫\040。 替換 Regex類有一個靜態Replace方法,其執行個體也有一個Replace方法,這個方法很強大,因為它可以傳入一個delegate,這樣,你可以自訂每次捕獲匹配時,
Time of Update: 2018-12-05
前面說過了用Response.BinaryWrite()只可以顯示一張圖片,現在用一個DATAGRID控制項,將圖片顯示在DATAGRID中的IMAGE控制項裡。(提示:下面的例子沒有做分頁功能) 裡面用了兩個圖片控制項,一個是伺服器端的ImageButton,另一個是用戶端的Image控制項。 前台代碼: <%@ Page language="c#" Codebehind="DataGridImage.aspx.cs"
Time of Update: 2018-12-05
有很多人不知道在多選框中全選怎麼還編寫代碼。其實很簡單,下面就是代碼以及說明,請仔細閱讀。 <script language="javascript"> //代碼說明(lulu163.com):form1為表單名,memberId為複選框,selectbutton為全選按鈕 function selectAll() { for (var i=0;i<document.form1.memberId.length;i++) {
Time of Update: 2018-12-05
最近做一個關於三級聯動的例子。想在頁面上顯示像樹形控制項一樣的效果,每一個大類下面有各自的子類。所以使用了Relations建立了表之間的關係(Relations是擷取用於將錶鏈接起來並允許從父表瀏覽到子表的關係的集合) 並卻使用了PagedDataSource對DataList進行了分頁(PagedDataSource封裝 DataGrid 控制項的屬性,這些屬性使該控制項可以執行分頁).DataGrid的內建的分頁就是使用的這個類。所以不能進行大量資料的分頁.
Time of Update: 2018-12-05
window.evet 說明 event代表事件的狀態,例如觸發event對象的元素、滑鼠的位置及狀態、按下的鍵等等。event對象只在事件發生的過程中才有效。event的某些屬性只對特定的事件有意義。比如,fromElement 和 toElement 屬性只對 onmouseover 和 onmouseout
Time of Update: 2018-12-05
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html;
Time of Update: 2018-12-05
有的時候我們需要隔一段時間做一些處理,可以在Web.Config中使用線程來處理(書中學習,整理了一下,以下是過5分鐘刪除一張表的記錄)using System;using System.Collections;using System.ComponentModel;using System.Web;using System.Web.SessionState;using DataBase;using System.Data.SqlClient;using System.Web.Security;
Time of Update: 2018-12-05
是用的FLASH調用資料庫的資料。代碼如下: <script type="text/javascript"> <!-- imgUrl1 = "http://www.moobol.com/livePic/manage/huxw/070225/083809_1.jpg"; imgText1 = ""; imgLink1 = escape("/molive/liveAction.do?method=findLiveList&liveId=12577"); imgUrl2 =