针对有网友说看不见文章内容, 现提示如下: 点击每一个标题行任一地方都会展开和隐藏此文章内容(不要点击标题). 目前展开隐藏功能只支持IE浏览器,虽然可以改成支持FF浏览器,不过现在一直没时间去弄,等有时间再修改了。 |
blog名称:乱闪Blog 日志总数:267 评论数量:1618 留言数量:-26 访问次数:2675026 建立时间:2005年1月1日 |
|

| |
[ASP.net]Loading制作
|
方法很简单。把代码放上来大家看看!打了包成了个控件。下载地址:http://upserver4.ys168.com/ys168up/D1/YY1.aspx?f=050P1D8E0E3E5D9D5G6ALI7A00A05AKA03D6A00A08A08I5F9G0E0D9E0D8D6E1A24E6E1D9E5D9C3下面是源码:===================================using System;
namespace HDControl{ /// <summary> /// Summary description for Loading. /// </summary> public class Loading { private System.Web.UI.Page Sender; private string strImagePath;
public object Page { get { return Sender; } set { Sender = (System.Web.UI.Page)value; } }
public string ImageMapth { get { return strImagePath; } set { strImagePath = value; } }
public Loading() { // }
public Loading( object sender ) { Page = sender; }
public Loading( object sender,string ImageMapth ) { Page = sender; this.strImagePath = ImageMapth; }
/// <summary> /// Load script to page /// </summary> public void Load() { if ( !this.Sender.IsClientScriptBlockRegistered( "startScript" ) ) { this.Sender.RegisterClientScriptBlock( "startScript",this.Start() ); this.Sender.RegisterStartupScript( "endScript",this.End() ); } }
/// <summary> /// Script start. /// </summary> /// <returns></returns> private string Start() { string strStyle = "BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none"; System.Text.StringBuilder strScript = new System.Text.StringBuilder(); strScript.Append( "<div id=\"loading\">" ); strScript.Append( "<table width=\"100%\" height=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\""+ strStyle + "\">" ); strScript.Append( "<tr style=\"" + strStyle + "\" ><td width=\"100%\" height=\"100%\" align=\"center\" valign=\"middle\" style=\"" + strStyle + "\">" ); strScript.Append( "<img src=\"" + this.ImageMapth + "\" border=\"0\">" ); strScript.Append( "</td></tr>" ); strScript.Append( "</table></div>" ); return strScript.ToString(); }
/// <summary> /// Script end. /// </summary> /// <returns></returns> private string End() { System.Text.StringBuilder strScript = new System.Text.StringBuilder(); strScript.Append( "<script language=\"javascript\">" ); strScript.Append( "window.document.getElementById(\"loading\").style.display = \"none\";" ); strScript.Append( "</script>" ); return strScript.ToString(); } }}=========================先在面页中using HDControl;调用方法(在Page_Load里):LoadingControl.Loading objLoad = new LoadingControl.Loading( this,"Images/loading.gif" );objLoad.Load();或:LoadingControl.Loading objLoad = new LoadingControl.Loading( );objLoad.Page = this;objLoad.ImageMapth = "Images/loading.gif";objLoad.Load(); |
|
回复:[ASP.net]Loading制作
|
电脑与网络 ChinaHongQ(游客)发表评论于2006/12/2 20:19:13 |
| |
回复:[ASP.net]Loading制作
|
电脑与网络 huifeidebaobao(游客)发表评论于2006/10/24 21:30:20 |
| |
回复:[ASP.net]Loading制作
|
电脑与网络 h(游客)发表评论于2005/12/16 11:25:52 |
| |
回复:[ASP.net]Loading制作
|
电脑与网络 liu(游客)发表评论于2005/11/23 9:21:19 |
| |
回复:[ASP.net]Loading制作
|
电脑与网络 liu(游客)发表评论于2005/11/23 9:21:16 |
| |
» 1 »
|