• 拼网页前的准备工作


    {
        margin
    : 0px auto;
        border-width
    : 0px;
    }
    /*===power by dare21century@gmail.com====*/
    body 
    {
        font
    : 12px "宋体";
        color
    : #555;
        width
    : 970px;
    }
    ul
    {list-style:none; margin:0; padding:0px}
    li
    {list-style:none; margin:0; padding:0px}
    img
    {border:none;}
    a:link 
    {
        color
    : #333333;
        text-decoration
    : none;
    }
    a:visited 
    {
        text-decoration
    : none;
        
    }
    a:hover 
    {
        text-decoration
    : none;
    }
    a:active 
    {
        text-decoration
    : none;
    }
    .clear
    {
        clear
    :both;
        height
    :0;
        font-size
    :0;
        
    }
         -moz-border-radius: 5px;
        -khtml-border-radius: 5px;
        -webkit-border-radius: 5px;
        border-radius: 5px;

    待续...... 

     有一个js把me迷住了!  嘿嘿~~~

    <script type="text/javascript">

    <!--
            document.write(
    "<noscript><iframe src=*.html></iframe></noscript>");
            
    function fun()
            {
                
    return false;
            }
            document.onselectstart
    =fun;    
        
    //-->

    </script>

     各行变色[来源小贺的博儿]

            protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
            {
                
    #region  变色
                
    if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    
    //当鼠标移到行上时更改背景色 
                    e.Row.Attributes.Add("onmouseover""c=this.style.backgroundColor;this.style.backgroundColor='#CED5F9'");
                    
    //当鼠标移开时还原背景色 
                    e.Row.Attributes.Add("onmouseout""this.style.backgroundColor=c");
                }
                
    for (int i = 0; i < GridView1.Rows.Count; i++)
                {
                    LinkButton lb 
    = GridView1.Rows[i].FindControl("LinkButton1"as LinkButton;
                    
    if (lb != null)
                    {
                        lb.Attributes.Add(
    "onclick""return confirm('您真的要删除此行吗?') ");
                    }
                }
                
    #endregion
            }

     设为首页 加入收藏:

    设置为首页的方法为:
    <href=# onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('URL');event.returnValue=false;">设为首页</a>
    URL就是你要设定的网址地址

    要设置当前网页的地址为首页,你可以这样:
    <href=# onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage(document.location.href);event.returnValue=false;">设为首页</a>
    上述方法采用javascript的document.location对象的href属性来获得当前网页的全路径。 
    <a href="Javascript:window.external.addFavorite('http://netsos.cnblogs.com','小贺')">加入收藏</a>
  • 相关阅读:
    超简单tensorflow入门优化程序&&tensorboard可视化
    tf.random_normal()函数
    tensorflow中创建多个计算图(Graph)
    tensorflow中有向图(计算图、Graph)、上下文环境(Session)和执行流程
    配置错误 在唯一密钥属性“fileExtension”设置为“.log”时,无法添加类型为“mimeMap”的重复集合项
    取奇偶数
    DNS添加/修改/查询/删除A记录
    IE自动化
    Get-ChildItem参数之 -Exclude,Filter,Recurse应用
    自动下载
  • 原文地址:https://www.cnblogs.com/NetSos/p/1775253.html
Copyright © 2020-2023  润新知