求一个网站首页的迎接画面,就是你访问一个网站你一打开上面显示了加载速度。当加载到100%的时候就自动跳到了首页。个人感觉那个是个FLASH,但是在网上又没找到。哪位兄弟这方面的东西多多发几个来参考下。在下感激不尽,先开100分帖不够的话,说声马上加。谢了,我邮箱[email protected]、、、、、、
在次感谢~~。

解决方案 »

  1.   

    flex  有 loadui adobe 开发的 加载组件
      

  2.   

    我有个js的多线程加载,就一行字,不是100%,楼主可暂时好用用!!js:
         <script   type="text/javascript"> 
          document.write(' <div id=loadDiv >页面正在载入,请等待 </div>');  
          var setInterval1 = setInterval("loading.innerText += '.'", 100);  
          var setInterval2 = setInterval("loading.innerText = '.'", 20000);  
          function  window.onload()  
          {  
                hiddenDiv.style.display="";  //显示页面内容  
                  loadDiv.removeNode(true);  
                clearInterval(setInterval1);  
                clearInterval(setInterval2);  
          }  
          </script>html:
    <body>
        <form id="form1" runat="server">
          <div id="hiddenDiv" style="display:none">
           ..............
          </div>
        </form>
    </body>   
      

  3.   

    <html> 
    <head> 
    <META http-equiv=Content-Type content="text/html; charset=gb2312"> 
    <META HTTP-EQUIV="pragma" CONTENT="no-cache"> 
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate"> 
    <META HTTP-EQUIV="expires" CONTENT="0"> 
    <title>预加载中....</title> 
    <style type="text/css"> 
    <!-- 
    .p { font-family: "MS Shell Dlg"; font-size: 12px} 
    --> 
    </style> 
    </head> 
    <body onLoad="location.href = url" oncontextmenu="window.event.returnValue=false" ondragstart="window.event.returnValue=false" onselectstart="event.returnValue=false"> 
    <script language="JavaScript"> 
    <!-- 
    var url = 'http://www.hldren.com/index.html'; 
    function jump(){ 
    location=url; 
    return true; 

    //--> 
    </script> 
    <div align="center"> 
    <center> 
    <table border="1" cellpadding="0" cellspacing="0" width="401" bordercolorlight="#808080" bordercolordark="#FFFFFF"> 
    <tr> 
    <td bgcolor="#F5F5F5" width="402"> <div id=process style="width: 400; height: 10"> </div> 
    <script> 
    var num=0; 
    function mypro() 

    num++; 
    process.innerHTML=process.innerHTML+'<font color="#0000FF">■</font>'; 
    if(num<26){setTimeout("mypro()",200);}else{process.innerHTML="";num=0;mypro()} 

    mypro(); 
    </script> 
    </td> <script> 
    <!-- 
    if (document.layers) 
    document.write('<Layer src="' + url + ' " VISIBILITY="hide"> </Layer>'); 
    else 
    if (document.all || document.getElementById) 
    document.write('<iframe src="' + url + '" style="visibility: hidden;"></iframe>'); 
    else location.href = url; 
    //--> 
    </script> 
    </tr> 
    </table> 
    </center> 
    </div> 
    <p align="center"><font class="p"><b>网站正在装载中,请稍候......</b></font></p> 
    </body> 
    </html> 
      

  4.   

    http://download.csdn.net/down/721206/zengjak
      

  5.   

     还有一种方法,就是可以及时更新进度条的数据的。那就是采用事件驱动机制,在子线程中监视复杂处理过程中的设定的事件,及时更新!直接看代码:
    程序代码using System;
    using System.ComponentModel;
    using System.Windows.Forms;
    namespace WindowsApplication1
    {
         /// <summary>
         /// Form1 类
         /// </summary>
         public partial class Form1 : Form
         {
             public Form1()
             {
                 InitializeComponent();
             }
             private void button1_Click(object sender, EventArgs e)
             {
                 //用子线程工作
                 new System.Threading.Thread(new System.Threading.ThreadStart(StartDownload)).Start();
             }
             //开始下载
             public void StartDownload()
             {
                 Downloader downloader = new Downloader();
                 downloader.onDownLoadProgress += new Downloader.dDownloadProgress(downloader_onDownLoadProgress);
                 downloader.Start();
             }
             //同步更新UI
             void downloader_onDownLoadProgress(long total, long current)
             {
                 if (this.InvokeRequired)
                 {
                     this.Invoke(new Downloader.dDownloadProgress(downloader_onDownLoadProgress), new object[] { total, current });
                 }
                 else
                 {
                     this.progressBar1.Maximum = (int)total;
                     this.progressBar1.Value = (int)current;
                 }
             }
         }     /// <summary>
         /// 下载类(您的复杂处理类)
         /// </summary>
         public class Downloader
         {
             //委托
             public delegate void dDownloadProgress(long total,long current);
             //事件
             public event dDownloadProgress onDownLoadProgress;
             //开始模拟工作
             public void Start()
             {
                 for (int i = 0; i < 100; i++)
                 {
                     if (onDownLoadProgress != null)
                         onDownLoadProgress(100, i);
                     System.Threading.Thread.Sleep(100);
                 }
             }
         }
    }=================================ling========================================
    delegate object dlExecuteQuery(); 
    private void button1_Click(object sender, EventArgs e) 

    dlExecuteQuery de=new dlExecuteQuery(this.Query()); 
    IAsyncResult ir = de.BeginInvoke(null, null);Form f=new Form() 
    f.ShowDialog(this); 
    Application.DoEvents(); 
    while (!ir.IsCompleted) 

    Application.DoEvents(); 

    object obj = de.EndInvoke(ir); 
    f.Close(); 
    }private object Query() 

    //长时间的操作 
    }
      

  6.   


    using System;
    using System.IO ;
    using System.Xml ;
    using System.Collections ;
    using System.Reflection ;
    using System.Text ;
    using System.Data ;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Drawing;
    using System.Threading ;
    #endregionnamespace WindowsApplication4
    {
    /// <summary>
    /// Copy Large File
    /// </summary>
    public class frmMain : System.Windows.Forms.Form
    {
    #region
    private System.Windows.Forms.ProgressBar progressBar1;
    private System.Windows.Forms.Button btnCopy;
    /// <summary>
    /// 必需的设计器变量。
    /// </summary>
    private System.ComponentModel.Container components = null;public frmMain()
    {
    //
    // Windows 窗体设计器支持所必需的
    //
    InitializeComponent();//
    // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
    //
    }/// <summary>
    /// 清理所有正在使用的资源。
    /// </summary>
    protected override void Dispose( bool disposing )
    {
    if( disposing )
    {
    if (components != null) 
    {
    components.Dispose();
    }
    }
    base.Dispose( disposing );
    }#region Initialize Components
    /// <summary>
    /// 设计器支持所需的方法 - 不要使用代码编辑器修改
    /// 此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {
    this.progressBar1 = new System.Windows.Forms.ProgressBar();
    this.btnCopy = new System.Windows.Forms.Button();
    this.SuspendLayout();
    // 
    // progressBar1
    // 
    this.progressBar1.Location = new System.Drawing.Point(8, 16);
    this.progressBar1.Name = "progressBar1";
    this.progressBar1.Size = new System.Drawing.Size(208, 16);
    this.progressBar1.TabIndex = 0;
    // 
    // btnCopy
    // 
    this.btnCopy.Location = new System.Drawing.Point(8, 48);
    this.btnCopy.Name = "btnCopy";
    this.btnCopy.TabIndex = 1;
    this.btnCopy.Text = "Copy";
    this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
    // 
    // frmMain
    // 
    this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    this.ClientSize = new System.Drawing.Size(232, 77);
    this.Controls.Add(this.btnCopy);
    this.Controls.Add(this.progressBar1);
    this.Name = "frmMain";
    this.Text = "Copy File";
    this.ResumeLayout(false);}
    #endregion/// <summary>
    /// Entry Point
    /// </summary>
    [STAThread]
    static void Main() 
    {
    Application.Run(new frmMain());
    }
    #endregionint totalSize; //Total Size
    int position; //Position
    const int BUFFER_SIZE = 4096; 
    byte[] buffer;
    Stream stream;private void btnCopy_Click(object sender, System.EventArgs e)
    {
    string strFile = "";OpenFileDialog dlg = new OpenFileDialog();
    if ( dlg.ShowDialog() == DialogResult.OK )
    {
    strFile = dlg.FileName ;
    }
    else
    {
    return ;
    }FileStream fs = new FileStream( strFile , FileMode.Open , FileAccess.Read ) ;
    totalSize = (int)fs.Length ;
    stream = fs;//Delete file which aready exists.
    if ( File.Exists( "c:\\copyedFile.bin" ) )
    File.Delete( "c:\\copyedFile.bin" );//Copy file while larger than 4KB.
    if ( totalSize > BUFFER_SIZE )
    {
    buffer = new byte[ BUFFER_SIZE ]; // Async Invoke
    stream.BeginRead( buffer , 0 , BUFFER_SIZE , new AsyncCallback( AsyncCopyFile ) , null ); 
    }
    else
    {
    fs.Close();
    }}/// <summary>
    /// Asynchronously copy file
    /// </summary>
    /// <param name="ar"></param>
    private void AsyncCopyFile( IAsyncResult ar )
    {
    int readedLength ;// Lock FileStream
    lock( stream )
    {
    readedLength = stream.EndRead( ar ); // When stream endread, get readed length
    }// Write to disk
    FileStream fsWriter = new FileStream( "C:\\copyedFile.bin" , FileMode.Append , FileAccess.Write );
    fsWriter.Write( buffer , 0 , buffer.Length );
    fsWriter.Close();// Current stream position 
    position += readedLength;// Response UI
    MethodInvoker m = new MethodInvoker( SynchProgressBar );
    m.BeginInvoke( null , null );if ( position >= totalSize ) // Read over.
    {
    stream.Close(); //Close FileStream 
    return ;
    }// Continue to read and write
    lock ( stream )
    {
    int leftSize = totalSize - position;if ( leftSize < BUFFER_SIZE ) 
    buffer = new byte[ leftSize ];stream.BeginRead( buffer , 0 , buffer.Length , new AsyncCallback( AsyncCopyFile ) , null ); }
    }private void SynchProgressBar()
    {
    this.progressBar1.Maximum = totalSize;
    this.progressBar1.Value = position ; 
    }}
    }
      

  7.   

    楼上的兄弟,我要求的是WEN的欢迎界面。你发的是WinForm的啊。
      

  8.   

    呵呵,努力学习,12楼很幽默啊
    <html>
    <head>
    <title>正在载入...</title>
    <meta http-equiv="Content-Type" c>
    </head>
    <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
    <table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%">
    <tr> 
    <form name=loading>
    <td align=center> 
    <p><font color=gray>正在载入首页,请稍候.......</font></p>
    <p> 
    <input type=text name=chart size=46 style="font-family:Arial; 
    font-weight:bolder; color:gray;
    background-color:white; padding:0px; border-style:none;">
    <br>
    <input type=text name=percent size=46 style="font-family:Arial; 
    color:gray; text-align:center; 
    border-width:medium; border-style:none;">
    <script>var bar = 0 
    var line = "||" 
    var amount ="||" 
    count() 
    function count(){ 
    bar= bar+2 
    amount =amount + line 
    document.loading.chart.value=amount 
    document.loading.percent.value=bar+"%" 
    if (bar<99) 
    {setTimeout("count()",100);} 
    else 
    {window.location = "http://www.baidu.com/";} 
    }
    </script>
    </p>
    </td>
    </form>
    </tr>
    </table>
    </body>
    </html>
      

  9.   

    有种方法不错,我都这么用的,真正的准确显示进度,需要加载的页面加载完成后,去掉进度条:
    你把一个页面套一个iframe,iframe链接的地址是你要加载的!然后在父页一开始的时候显示进度条,隐藏iframe,等子页面加载完成后,再控制父页面的进度条隐藏,iframe显示。
      

  10.   


     protected void Page_Load(object sender, EventArgs e)
        {
            Response.Write("<div id='mydiv' >"); 
            Response.Write("_");
            Response.Write("</div>"); 
            Response.Write("<script>mydiv.innerText = '';</script>"); 
            Response.Write("<script language=javascript>;"); 
            Response.Write("var dots = 0;var dotmax = 10;function ShowWait()");
            Response.Write("{var output; output = '正在装载页面';dots++;if(dots>=dotmax)dots=1;");
            Response.Write("for(var x = 0;x < dots;x++){output += '·';}mydiv.innerText =  output;}");
            Response.Write("function StartShowWait(){mydiv.style.visibility = 'visible'; "); 
            Response.Write("window.setInterval('ShowWait()',1000);}"); 
            Response.Write("function HideWait(){mydiv.style.visibility = 'hidden';"); 
            Response.Write("window.clearInterval();}"); 
            Response.Write("StartShowWait();</script>");
            Response.Flush();
            Thread.Sleep(4000);//
    //轉到首頁
    RESPONSE.REDIRECT("INDEX.ASPX")    }
      

  11.   

    无法在发送 HTTP 标头之后进行重定向。 
    说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Web.HttpException: 无法在发送 HTTP 标头之后进行重定向。 你自己去试下就知道了。有没有好看一点的?怎么加载的页面都这么单调。我看到有的网站加载的页面都蛮好看的。
      

  12.   

    直接复制到txt里然后把txt换成html 运行就可以了
    本特效共分3步:
    1.在<head></head>中加入:
    <STYLE type=text/css>TD {
    FONT-SIZE: 9pt
    }
    .come {
    BACKGROUND-COLOR: #eff7d4; BORDER-BOTTOM: #c07a0b 1px dashed; BORDER-LEFT: #c07a0b 1px dashed; BORDER-RIGHT: #c07a0b 1px dashed; BORDER-TOP: #c07a0b 1px dashed; COLOR: #000000; FONT-SIZE: 9pt; HEIGHT: 18px
    }
    </style>
    <SCRIPT language=javascript>
      var percent = new Number(0);
      function skipmain() {
        dopgb();
      }
      function dopgb() {
        var pgb = document.all.pgbdiv.style;
        var timeoutID = setTimeout("dopgb()",100);
        if (pgb.pixelWidth < 230) pgb.pixelWidth += 5;
        percent = parseInt(100 * (pgb.pixelWidth / 230) + 1) + 1;
        if (percent > 100) percent = 100;
        document.all.perdiv.innerHTML="<p align='center' style='margin-top:0;margin-bottom:0'>" + percent.toString(10) + " %</p>"
        if (pgb.pixelWidth >= 230) {
          clearTimeout(timeoutID);
          window.navigate("http://www.alixixi.com/");
          return;
        }
      }
    </SCRIPT>2.将 onload=skipmain() 插入到<body>中例如:<body onload=skipmain()>3.在<body></body>中间加入:
          <TABLE align=center border=1 borderColor=#000000 cellPadding=0        
          cellSpacing=0 height=10        
          style="BORDER-COLLAPSE: collapse; MARGIN: 10px 0px 0px" width=230        
          name="pgb_container1">       
            <TBODY>       
            <TR>       
              <TD class=newfont3>       
                <DIV id=pgbdiv        
                style="BACKGROUND-COLOR: #65a1ca; HEIGHT: 10px; MARGIN: 0px; TEXT-ALIGN: center; WIDTH: 0px"        
                border="0"></DIV></TD></TR></TBODY></TABLE>       
          <P align=center style="MARGIN-TOP: 5px">       
          <DIV align=center id=perdiv style="MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px">       
          <P align=center class=newfont3        
          style="MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px">0 %</P></DIV>           
         
          <P align=center style="MARGIN: 10px"><INPUT align=center class=come onclick="window.navigate('http://www.alixixi.com/')" style="cursor: hand; width: 140; height: 22" title=我不想等了,直接进入 type=button value=直接进入2259音乐空间>         
          </P>
      

  13.   

    http://www.google.cn/search?hl=zh-CN&q=%E7%BD%91%E9%A1%B5++loading&meta=&aq=f&oq=
    怎么就这么懒呢!!
      

  14.   

    大多是flash做的,用FLEX也可以实现,有这个控件
      

  15.   

    我估计好看的也是FLASH做的,怎么就是在网上找不到。哎,郁闷。
      

  16.   

    我晕,按照楼上提示的百度Google搜了几百遍了都没找到一个我想要的~~~~~~~~~~~狂晕。
      

  17.   

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="start.aspx.cs" Inherits="start" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <HTML>
    <HEAD>
    <title>Start</title>
    <style>
    .30pt{font-size:30pt;font-family:汉鼎繁特楷;color:black}
    .40pt{font-size:30pt;font-family:FetteFraD;color:#de3076}
    </style>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    var num = new Array(6)
    for (var i = 0; i < num.length ; i++) {
            num[i] = new Image()
            num[i].src ="pictures/mouse/"+i+"i.gif"
    }
    var nextPage = "Pic.aspx";
    function makearray(n) 
    {
        this.length = n;
        for(var i = 1; i <= n; i++)
    this[i] = 0;
        return this;
    }hexa = new makearray(16);for(var i = 0; i < 10; i++)
        hexa[i] = i;
    hexa[10]="a"; hexa[11]="b"; hexa[12]="c";
    hexa[13]="d"; hexa[14]="e"; hexa[15]="f";function tohex(i) {
        if (i < 0)
    return "00";
        else if (255 < i)
    return "ff";
        else
    return "" + hexa[Math.floor(i/16)] + hexa[i%16];
    }function fade(s_red, s_green, s_blue, e_red, e_green, e_blue, step) {
        for(var i = 0; i <= step; i++) 
        {
          document.bgColor="#" + tohex(Math.floor(s_red * ((step-i)/step) + e_red * (i/step))) 
                               + tohex(Math.floor(s_green * ((step-i)/step) + e_green * (i/step)))
                               + tohex(Math.floor(s_blue * ((step-i)/step) + e_blue * (i/step)));
        }
    }
    function countdown(idx)
    {
       if (idx == 0 )
        { 
          window.status="We go now !";
          fade(255,255,255,0,0,0,255);
          top.location=nextPage;
        }
       else
        {
         window.status=idx+" seconds left";
         nextimg=setTimeout("countdown(" + (idx-1) + ")", 1000);
        }
    }  function countdown(idx)
    {
       if (idx == 0 )
        { 
          document.img.src=num[idx].src;
          window.status="We go now !";
          fade(255,255,255,0,0,0,100);
          location.replace(nextPage);
        }
       else
        {
          document.img.src=num[idx].src;
          window.status=idx+" seconds left";
          nextimg=setTimeout("countdown(" + (idx-1) + ")", 1000);
        }
    }  
    -->
    </SCRIPT>
    </HEAD>
    <BODY TEXT="#000000" background="pictures/bg.jpg" BGCOLOR=black LINK="#000099" VLINK="#551A8B" ALINK="#993366">
    <CENTER>
    <font class=30pt><br>欢迎来到我的主页!</font></br>
    <IMG NAME=img SRC="pictures/mouse/logo.gif" HEIGHT=150 WIDTH=150><P>
    <font class=40pt>Let's go!</font>
    <font class=80pt>我的地盘我做主!现在大家耐心等个5秒种!!!</font>
    <FONT SIZE=-1>
    <script language=JavaScript>
    fade(0, 0, 0, 255, 255, 255, 100);
    </script>
    <script language=JavaScript>
    countID=setTimeout("countdown(5)", 4000); //give 4 sec to load all images to cache
    </script>
    </FONT>
    </CENTER>
    </body>
    </html>
      

  18.   

    pictures/mouse/logo.gif 图片自己替换一下