• 一句话概述代码的用途


    1. [代码][HTML]代码     

    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>无标题文档</title>
    </head>
    <body>
     
    <h1>很大的标题</h1>
     
    </body>
    </html>
    2. [代码][JavaScript]代码     

    function login() {
     
        var pa = $('#userId').val(), pb = $('#passId').val();
     
         
     
         var exp = new Date(); 
     
     
     
            exp.setTime(exp.getTime() + (30*24*60*60*1000));
     
     
     
            window.document.cookie = "username" + "=" + pa + "; expires=" + exp.toGMTString()+";path=/";
     
     
     
            window.document.cookie = "password" + "=" + pb + "; expires=" + exp.toGMTString()+";path=/";
     
     
     
         
     
         
     
        if (pa != '' && pb != '')
     
            return true;
     
        alert('帐号与密码必须要填,否则不让你登录');
     
        return false;
     

     
     
     
    function setFoucs(){
     
        $('#userId').val(GetCookie("username"));
     
        $('#passId').val(GetCookie("password"));
     
     
     
      }
     
     
     
     
     
     //cookie
     
     
     
         function GetCookie (name) 
     
     
     
        { 
     
     
     
           var arg = name + "="; 
     
     
     
           var alen = arg.length; 
     
     
     
           var clen = window.document.cookie.length; 
     
     
     
           var i = 0; 
     
     
     
           while (i < clen) 
     
     
     
           { 
     
     
     
                var j = i + alen; 
     
     
     
                if (window.document.cookie.substring(i, j) == arg) return getCookieVal (j); 
     
     
     
                    i = window.document.cookie.indexOf(" ", i) + 1; 
     
     
     
                if (i == 0)
     
     
     
                    break; 
     
     
     
            } 
     
     
     
            return null;
     
     
     
        }
     
     
     
     
     
     
     
        function getCookieVal (offset)
     
     
     
        { 
     
     
     
            var endstr = window.document.cookie.indexOf (";", offset); 
     
     
     
            if (endstr == -1)
     
     
     
                endstr = window.document.cookie.length; 
     
     
     
            return unescape(window.document.cookie.substring(offset, endstr));
     
     
     
        }
    3. [代码][HTML]代码     

    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>无标题文档</title>
    </head>http://www.enterdesk.com/special/huangguantp/
    <body>皇冠图片
     
    <h1>很大的标题</h1>
     
    </body>
    </html>

  • 相关阅读:
    Linux磁盘空间被未知资源耗尽
    磁盘的分区、格式化、挂载(转)
    sp_MSforeachtable和sp_MSforeachdb
    分布式缓存系统 Memcached 【转载】
    在性能计数的时候使用StopWatch类型
    数据库设计阶段中为何要考虑“反规范化”
    再谈谈数据库镜像之客户端重定向
    当SQL Server排序时遇上了NULL值
    ArrayList的动态扩展
    SSMS 2008的智能感知仅仅针对SQL Server 2008的数据库有效
  • 原文地址:https://www.cnblogs.com/xkzy/p/3968647.html
Copyright © 2020-2023  润新知