zoukankan      html  css  js  c++  java
  • 拼网页前的准备工作

    {
        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>
  • 相关阅读:
    [转]狼的故事8:生存就是坚持
    [转]狼的故事7:单枪匹马的代价
    如何在GridView的Footer内显示总计?
    javascript中如何正确将日期(Date)字符串转换为日期(Date)对象?
    无限级分类(非递归算法/存储过程版/GUID主键)完整数据库示例_(1)表结构
    [转]狼的故事12:王者的风范
    [转]狼的故事2:光线背后的嚎叫
    vs.net2008正式版发布并提供下载(英文版)
    [转]狼的故事11:以牙还牙
    [转]狼的故事3:百分之百的死亡
  • 原文地址:https://www.cnblogs.com/NetSos/p/1775253.html
Copyright © 2011-2022 走看看