default.aspx

来自「ASPNET程序开发范例宝典02.rar ASP.NET applicatio」· ASPX 代码 · 共 55 行

ASPX
55
字号
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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 runat="server">
    <title>文字滚动显示</title>
</head>
<body>
   <script language="JavaScript1.2">
//设置marquee显示内容,使用标准的HTML语法。
var text='<strong><big>欢迎光临<a href="http://www.mingrisoft.com">明日科技</a>图书网</big></strong></font>'
if (document.all)
document.write('<marquee scrollAmount='+6+' style="width:'+500+'">'+text+'</marquee>')
function a()
{
    window.location.reload()
}
function b()
{
    if (document.layers)
    {
        setTimeout("window.onresize=a",450)
        c()
    }
}
function c()
{
    document.cmarquee01.document.cmarquee02.document.write('<nobr>'+text+'</nobr>')
    document.cmarquee01.document.cmarquee02.document.close()
    thelength=document.cmarquee01.document.cmarquee02.document.width
    d()
}
function d()
{
    if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1))
    {
        document.cmarquee01.document.cmarquee02.left-=6
        setTimeout("d()",100)
    }
    else
    {
        document.cmarquee01.document.cmarquee02.left=500
        d()
    }
}
window.onload=b
</script>
<ilayer width=&{500}; height=&{30}; name="cmarquee01"> 
<layer name="cmarquee02"></layer>
</ilayer>

</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?