1、自动跳转页面

<script  language="javascript" defer="defer">

        function doload()

        {

            window.close();

            opener.location.href = "cgsgl.aspx";

        }

                   <%if(Request.Cookies["CGS_QQ_ID"]!=null) {%>

                            setTimeout("doload()",4000);

                  <%} %>

    </script>

2、自动省略

       1、文本自动省略

       <script type="text/javascript">

       function check(node){

              var str = node.firstChild.nodeValue;

              if(str.length>10){

                     node.firstChild.nodeValue = str.substring(0,10) + "...";

              }

       }

       </script>

       2、屏蔽网页错误

       <script type="text/javascript">

       window.onerror=function(){return true;}

       </script>

posted on 2014-05-23 17:35  凝枫霜颖  阅读(94)  评论(0编辑  收藏  举报