/*  
*  UseStudio.Example 主js文件
*  负责处理实例的代码
*  qv
**/

//Namespace.register("U.EX.CL");
U.EX.CL = {}; //暂时没有用Uj

rec = function (obj) {
    var p = obj.parentElement
    , tagName = obj.tagName
    , id = obj.id;
    obj.parentElement.removeChild(obj);
    obj = document.createElement(tagName);
    obj.id = id;
    p.appendChild(obj);
}

//载入代码的函数
U.EX.CL.Load = function (arm) {
    rec($("#U_E_CR_Iframe")[0]);
    var s = (arm ? U.EX.CL.LangArr[arm] : "") //获取代码
    , doc = $("#U_E_CR_Iframe")[0].contentWindow.document.open("text/html", "replace"); //创建doc对象

    doc.write(s); //写入
    doc.close(); //关闭

    $("#U_E_CL_Code")[0].innerText = s; //把文本放到Code里面
    U.EX.SList("U_E_List");
}

//例子代码的JSON
U.EX.CL.LangArr = {
    "USocket": "﻿<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n    <title>聊天室</title>\r\n    <!-- 这里  -->\r\n    <script src=\"http://socketio.1473.cn/socket.io/socket.io.js\"></script>\r\n    <script src=\"http://socketio.1473.cn/socket.js\"></script>\r\n    <!-- 到这里调用socket的时候必要的 -->\r\n    <style>\r\n        *\r\n        {\r\n            padding: 0px;\r\n            margin: 0px;\r\n        }\r\n        #m div\r\n        {\r\n            font: 18px 微软雅黑;\r\n            height: 36px;\r\n            line-height: 36px;\r\n        }\r\n        #m div:nth-child(odd)\r\n        {\r\n            background: #eee;\r\n        }\r\n    </style>\r\n</head>\r\n<body style=\"height: 100%;\">\r\n    <div id=\"xxx\" style=\"width: 220px; height: 30px; background: #d6d6d6; position: absolute;\r\n        top: 40%; left: 45%; font: 16px 微软雅黑; text-align: center; line-height: 30px;\r\n        border: 1px solid #d6d6d6;\">\r\n        名字\r\n        <button style=\"width: 20%; height: 30px; float: right;\" onclick=\"queding();\">\r\n            确定</button>\r\n        <input id=\"n\" style=\"width: 60%; padding: 0px; border: 0px; height: 30px; float: right;\" />\r\n    </div>\r\n    <div id=\"m\" style=\"width: 100%; height: 600px; background: white; border: 1px solid #d6d6d6;\r\n        overflow: auto;\">\r\n    </div>\r\n    <input id=\"t\" onkeydown=\"sens()\" style=\"width: 80%; height: 40px; float: left; font: 24px 微软雅黑;\" />\r\n    <div id=\"b\" onclick=\"send();\" style=\"width: 19.7%; height: 40px; float: left; background: #2d2d2d;\r\n        color: White; font: 24px 微软雅黑; text-align: center; line-height: 40px;\">\r\n        发送</div>\r\n</body>\r\n<script type=\"text/javascript\">\r\n    function jieshou(msg) {\r\n        var m = document.getElementById(\"m\");\r\n        if (msg.type === \"send\") {\r\n            m.innerHTML += \"<div>\" + msg.from + \":\" + msg.data + \"</div>\";\r\n        }\r\n        if (msg.type === \"join\") {\r\n            m.innerHTML += \"<div>\" + msg.from + \"加入了房间!</div>\";\r\n        }\r\n        if (msg.type === \"exit\") {\r\n            m.innerHTML += \"<div>\" + msg.from + \"退出了房间!</div>\";\r\n        }\r\n        m.scrollTop = m.scrollHeight\r\n    }\r\n    function sens(e) { e = e || event; if (e.keyCode === 13) send(); }\r\n    function send() {\r\n        var t = document.getElementById(\"t\");\r\n        t = t.value;\r\n        if (t != \"\") {\r\n            document.getElementById(\"t\").value = \"\";\r\n            socket.send(t, \"aa\");\r\n        }\r\n    }\r\n    function queding(e) {\r\n        socket = new socket(document.getElementById(\"n\").value);\r\n        socket.join(\"aa\", jieshou);\r\n        document.body.removeChild(document.getElementById(\"xxx\"));\r\n        window.onunload = function () {\r\n            socket.exit('aa');\r\n        }\r\n    }\r\n\r\n</script>\r\n</html>\r\n"
    , "UIpdb": "﻿<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n    <title></title>\r\n    <meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\r\n    <!--1473基础js类-->\r\n    <script type=\"text/javascript\">        document.domain = \"1473.cn\";</script>\r\n    <script src=\"http://www.1473.cn/js/UC/UC23.js\" type=\"text/javascript\"></script>\r\n    <script src=\"http://nodejs.1473.cn/crossdomain.js\" type=\"text/javascript\"></script>\r\n\r\n    <script type=\"text/javascript\">\r\n\r\n        //1473Ajax获取数据方法\r\n        //U.CD.AjaxUrl = 'http://node-back.1473.cn:3000/'; //后台默认请求页面\r\n        //U.CD.AjaxCross = \"http://node-back.1473.cn:3000/CD.htm\"; //后台跨域文件\r\n        //U.CD.Init(); //在合适的地方例如window.onload中初始化跨域文件\r\n        //U.ACD.Request(U.CD.AjaxUrl, ([\"mode\", \"aaa\"]), U.School.aa_asyn, ([\"\"]));//向后台传递参数的调用形式\r\n        //U.CD.AsynJWH  //辅助函数,可重写此方法，在跨域文件加载完毕后可以执行的函数。\r\n\r\n        U.CD.AjaxUrl = 'http://nodejs.1473.cn/'; //后台默认请求页面\r\n        U.CD.AjaxCross = \"http://nodejs.1473.cn/CD.htm\"; //后台跨域文件\r\n        U.CD.Host = \"192.168.100.61\";           //需要更换数据库host，在这里更换\r\n        //U.CD.Host = \"node-back.1473.cn\";     //回家做作业时候需要用域名\r\n        U.CD.Database = \"UseStudio_IPDB\"; //需要更换数据库名字，在这里更换UseStudio_School\r\n        Namespace.register(\"U.IPaddress\"); //示例项目命名空间，需要调整命名空间的请重新定义命名空间\r\n        U.IPaddress.init = function () {\r\n            U.CD.Init(); //初始化跨域文件\r\n        }\r\n        //如果在window.onload中需要调用数据库，则必须写在此函数中，此函数解决跨域前后台验证是否同域。\r\n        //        U.CD.AsynJWH = function () {\r\n        //            U.ACD.Request(U.CD.AjaxUrl, ([U.CD.Host, U.CD.Database, \"t\"]), U.IPaddress.aa_asyn, ([\"\", \"bb\"]));\r\n        //        }\r\n        U.IPaddress.aa = function (db, r, val) {\r\n            U.ACD.Request(U.CD.AjaxUrl, ([U.CD.Host, U.CD.Database, r, val]), U.IPaddress.aa_asyn, ([\"\", \"bb\"]));\r\n            //---------------------------db 为数据库名字, r为 存储过程函数， val为该存储过程的参数 若没有参数可以不传 若有多个参数采用数组的方法，\r\n            //-----------------------------------------------------------------------------------例如传入 [a,b] 查看下面 div文本为北京的元素\r\n            //U.ACD.Request(U.CD.AjaxUrl, ([type, userid, node.ID, node.Deep, _nnode.ID, _nnode.Name]), U.CD.RT.CP_OKAsyn, ([\"\"]));\r\n            //U.ACD.Request(U.CD.AjaxUrl, ([\"Add_File\", userid, node.ID, node.Deep, _nnode.ID, _nnode.Name, content]), U.CD.RT.CP_OKAsyn, ([\"\"]));\r\n        }\r\n        U.CD.IP = function () {\r\n            U.ACD.Request(U.CD.AjaxUrl, ([U.CD.Host, U.CD.Database, \"usipaddress\", \"\"]), U.IPaddress.bb_asyn, ([\"\", \"bb\"]));\r\n        }\r\n        U.IPaddress.bb_asyn = function (request) {\r\n            request = request.value;\r\n            $(\"#IP_\")[0].innerHTML = request;\r\n        }\r\n\r\n        U.IPaddress.aa_asyn = function (r) {\r\n            var ip = $(\"#neirong\")[0];\r\n            ip.innerHTML = \"\";\r\n            r = r.value[0][0];\r\n            if (r) {\r\n                for (var i in r) {      //循环json数组的值\r\n                    ip.innerHTML += $(\"#wenben\")[0].value + \"____\" + \"来自：\" + r[i];   //循环打印出json数组中的数据\r\n                }\r\n            }\r\n            else { ip.innerHTML = \"您输入的ip不存在，请重新输入。\"; }\r\n            $(\"#TS_\")[0].style.display = \"block\";\r\n            $(\"#wenben\")[0].value = '';\r\n        }\r\n        window.onload = U.IPaddress.init;    \r\n    </script>\r\n</head>\r\n<body>\r\n    <center>\r\n        <div style=\"font-family: 微软雅黑; font-size: 40px; height: 40px;\">\r\n            IP查询</div>\r\n    </center>\r\n    <div id=\"IP_\" style=\"width: 150px; height: 100px; background: lightblue; line-height: 100px;\r\n        margin-left: 44%; margin-top: 2%; text-align: center;\" onclick=\"U.CD.IP()\">\r\n        点击获取本机IP地址\r\n    </div>\r\n    <div style=\"text-align: center; margin-top: 10px;\">\r\n        <div id=\"TS_\" style=\"display: none;\">\r\n            您输入的ip是：\r\n        </div>\r\n        <div id=\"neirong\" style=\"width: auto; height: auto; color: Red;\">\r\n        </div>\r\n        <div>\r\n            <input type=\"text\" placeholder=\"请输入ip地址\" id=\"wenben\" />\r\n            <input type=\"button\" value=\"查询\" id=\"dianwo\" onclick=\"U.IPaddress.aa('','IPDE_SEC',wenben.value)\" />\r\n        </div>\r\n    </div>\r\n</body>\r\n</html>\r\n"
    , "UDateSelect": "﻿<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n    <title></title>\r\n    <script type=\"text/javascript\">        document.domain = \"1473.cn\";</script>\r\n    <script src=\"http://www.1473.cn/js/UC/UC23.js\" type=\"text/javascript\"></script>\r\n    <script>\r\n        U.Date = function (idd) {\r\n            var _U = new U.DateT();\r\n            ($(\"#\" + idd.id + \"e\")[0]) ? _U.dis(idd) : _U.init(idd);\r\n        }\r\n        U.DateT = function () { }\r\n        U.DateT.prototype = {\r\n            init: function (idd) {     //  初始化 \r\n                this.bool = false;\r\n                this.r_R_d = new Date();\r\n                var _D = new Date();\r\n                this.Year = _D.getFullYear();\r\n                this.Day = _D.getDate();\r\n                this.Month = _D.getMonth() + 1;\r\n                this.Hs = _D.getHours();\r\n                this.Mi = _D.getMinutes();\r\n                this.Se = _D.getSeconds();\r\n                this.LV(idd);\r\n                this.LD();\r\n                this.Main(idd);\r\n                this.GOE(this, idd);\r\n            },\r\n            dis: function (idd) {\r\n                var a = $(\"#\" + idd.id + \"e\")[0];\r\n                (a.style.display == \"none\") ? a.style.display = \"block\" : a.style.display = \"none\";\r\n            },\r\n            LV: function (idd) {           //加载视图\r\n                //  IPA = $$(\"a\", { \"onclick\": [[U.M.StopBubble], [this.Zoom, ([\"Out\", _UIOD, this])]] }, _UICD);\r\n                var Box = $$(\"div\", { \"id\": idd.id + \"e\", \"style\": { \"position\": \"absolute\", \"top\": 20 + $(\"#\" + idd.id)[0].offsetTop + \"px\", \"left\": $(\"#\" + idd.id)[0].offsetLeft + \"px\", \"width\": \"185px\", \"height\": \"240px\", \"background\": \"rgba(255,255,255,0.3)\", \"padding\": \"12px\", \"box-shadow\": \"0 0 8px 0 rgba(0,0,0,0.2)\", \"border-radius\": \"3px\"} }, document.body)\r\n             , Top = $$(\"div\", { \"style\": { \"width\": \"185px\", \"height\": \"20px\", \"color\": \"#0879E1\", \"font-size\": \"14px\", \"text-align\": \"center\", \"line-height\": \"10px\"} }, Box)\r\n             , Middle = $$(\"div\", { \"style\": { \"width\": \"185px\", \"height\": \"200px\"} }, Box)\r\n             , btn_T = $$(\"div\", { \"style\": { \"width\": \"185px\", \"height\": \"30px\"} }, Middle)\r\n             , b_left2 = $$(\"div\", { \"onclick\": [[this.Lert, ([this, -1, idd])]], \"innerHTML\": \"?\", \"style\": { \"font-size\": \"10px\", \"float\": \"left\", \"cursor\": \"pointer\"} }, btn_T)\r\n             , b_date = $$(\"div\", { \"style\": { \"font-size\": \"14px\", \"float\": \"left\", \"margin-left\": \"43px\", \"color\": \"#323232\"} }, btn_T)\r\n             , b_right = $$(\"div\", { \"onclick\": [[this.Lert, ([this, 1, idd])]], \"innerHTML\": \"?\", \"style\": { \"font-size\": \"10px\", \"float\": \"right\", \"cursor\": \"pointer\"} }, btn_T)\r\n             , Bottom = $$(\"div\", { \"style\": { \"width\": \"185px\", \"height\": \"30px\"} }, Box)\r\n             , D_Y = $$(\"input\", { \"type\": \"text\", \"maxLength\": \"4\", \"style\": { \"margin-left\": \"1px\", \"outline\": \"none\", \"float\": \"left\", \"width\": \"30px\", \"height\": \"15px\"} }, Bottom)\r\n             , D_U = $$(\"input\", { \"type\": \"text\", \"maxLength\": \"2\", \"style\": { \"margin-left\": \"1px\", \"outline\": \"none\", \"float\": \"left\", \"width\": \"15px\", \"height\": \"15px\"} }, Bottom)\r\n             , D_R = $$(\"input\", { \"type\": \"text\", \"maxLength\": \"2\", \"style\": { \"margin-left\": \"1px\", \"outline\": \"none\", \"float\": \"left\", \"width\": \"15px\", \"height\": \"15px\"} }, Bottom)\r\n             , D_H = $$(\"input\", { \"type\": \"text\", \"maxLength\": \"2\", \"style\": { \"margin-left\": \"5px\", \"outline\": \"none\", \"float\": \"left\", \"width\": \"15px\", \"height\": \"15px\"} }, Bottom)\r\n             , D_M = $$(\"input\", { \"type\": \"text\", \"maxLength\": \"2\", \"style\": { \"margin-left\": \"1px\", \"outline\": \"none\", \"float\": \"left\", \"width\": \"15px\", \"height\": \"15px\"} }, Bottom)\r\n             , D_S = $$(\"input\", { \"type\": \"text\", \"maxLength\": \"2\", \"style\": { \"margin-left\": \"1px\", \"outline\": \"none\", \"float\": \"left\", \"width\": \"15px\", \"height\": \"15px\"} }, Bottom)\r\n             , D_OK = $$(\"input\", { \"onclick\": [[this.Fix, ([this, idd])]], \"type\": \"button\", \"value\": \"确定\", \"style\": { \"width\": \"40px\", \"height\": \"21px\"} }, Bottom)\r\n             , O_R = [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"];\r\n\r\n                for (var i = 0; i < O_R.length; i++) {\r\n                    var O_R_O = $$(\"div\", { \"style\": { \"text-align\": \"center\", \"float\": \"left\", \"list-style-type\": \"none\", \"width\": \"24px\"} }, Middle);\r\n                    O_R_O.innerHTML = O_R[i];\r\n                }\r\n                var DateD = $$(\"div\", { \"id\": idd.id + \"d\" }, Middle);\r\n                this.Box = Box;\r\n                this.Top = Top;\r\n                this.Middle = Middle;\r\n                this.DateD = DateD;\r\n                this.b_date = b_date;\r\n                this.Bottom = Bottom;\r\n                this.D_Y = D_Y;\r\n                this.D_U = D_U;\r\n                this.D_R = D_R;\r\n                this.D_H = D_H;\r\n                this.D_M = D_M;\r\n                this.D_S = D_S;\r\n            },\r\n            LD: function () {          //加载数据\r\n                this.Time();\r\n                this.DateD.innerHTML = \"\";\r\n                this.D_Y.value = this.Year;\r\n                this.D_U.value = this.Month;\r\n                this.D_R.value = this.Day;\r\n                this.D_H.value = this.Hs;\r\n                this.D_M.value = this.Mi;\r\n                this.D_S.value = this.Se;\r\n                this.b_date.innerHTML = this.Year + \"年\" + (this.Month) + \"月\";\r\n                var begin = this.DOM(this.Month - 1) - this.DOW() + 1;\r\n                for (j = 0; j < this.DOW(); j++) {\r\n                    var Ui = $$(\"div\", { \"style\": { \"color\": \"#999999\", \"float\": \"left\", \"width\": \"24px\", \"text-align\": \"center\", \"height\": \"22px\", \"line-height\": \"28px\"} }, this.DateD);\r\n                    Ui.innerHTML = begin++;\r\n                }\r\n                for (var i = 0; i < this.DOM(); i++) {\r\n                    var Ui = $$(\"li\", { \"style\": { \"list-style-type\": \"none\", \"float\": \"left\", \"width\": \"24px\", \"height\": \"22px\", \"margin\": \"2px 0px\", \"line-height\": \"22px\", \"text-align\": \"center\"} }, this.DateD);\r\n                    if (i + 1 == this.r_R_d.getDate() && (this.Month) == (this.r_R_d.getMonth() + 1) && this.Year == this.r_R_d.getFullYear()) {\r\n                        Ui.style.cssText += \"color:#0879e1;width:22px;height:20px;border:1px solid #0879e1;\"\r\n                    }\r\n                    Ui.innerHTML = i + 1;\r\n                }\r\n\r\n            },\r\n            Time: function () {\r\n                this.Se++;\r\n                if (this.Se >= 60) {\r\n                    this.Mi++;\r\n                    this.Se = 0;\r\n                }\r\n                if (this.Mi >= 60) {\r\n                    this.Hs++;\r\n                    this.Mi = 0;\r\n                }\r\n                if (this.Hs >= 24) {\r\n                    this.Hs = 0;\r\n                }\r\n                this.Top.innerHTML = this.r_R_d.getFullYear() + \"年\" + (this.r_R_d.getMonth() + 1) + \"月\" + this.r_R_d.getDate() + \"日\" + this.Hs + \"时\" + this.Mi + \"分\" + this.Se + \"秒\";\r\n            },\r\n            _LY: function () {                // isLeapYear 是否为闰年    \r\n                return (0 == this.Year % 4 && ((this.Year % 100 != 0) || (this.Year % 400 == 0)));\r\n            },\r\n            DOM: function () {                //dayofMonth  获取当前月的天数\r\n                var MArray = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; // 30,31月的数组  \r\n                (this._LY()) ? MArray[1] = 29 : MArray[1] = 28;\r\n                return (arguments[0] ? MArray[arguments[0] - 1] : MArray[this.Month - 1]);\r\n            },\r\n            DOW: function () {                 // dayofWeek 获取星期\r\n                return new Date(this.Year + \"-\" + this.Month + \"-\" + 1).getDay();\r\n            },\r\n            Main: function (idd) {\r\n                setInterval(function (that) { return function () { that.Time(); } } (this), 1000);\r\n            },\r\n            GDate: function (idd) {\r\n                var ar = $(\"#\" + idd.id)[0];\r\n                ar.value = this.Year + \"-\" + this.Month + \"-\" + this.Day + \" \" + this.Hs + \":\" + this.Mi + \":\" + this.Se;\r\n            },\r\n            Fix: function (that, idd) {\r\n                that.r_R_d.setDate(that.D_R.value); that.r_R_d.setMonth(that.D_U.value - 1); that.r_R_d.setFullYear(that.Year);\r\n                that.r_R_d.setHours(that.D_H.value); that.r_R_d.setMinutes(that.D_M.value); that.r_R_d.setSeconds(that.D_S.value);\r\n                that.Year = that.r_R_d.getFullYear(); that.Month = that.r_R_d.getMonth() + 1; that.Day = that.r_R_d.getDate();\r\n                that.Hs = that.r_R_d.getHours(); that.Mi = that.r_R_d.getMinutes(); that.Se = that.r_R_d.getSeconds();\r\n                that.GDate(idd);\r\n                that.LD();\r\n                alert(\"修改成功\");\r\n                // document.body.removeChild(that.Box);\r\n                that.Box.style.display = \"none\";\r\n                that.GOE(that, idd);\r\n            },\r\n            Lert: function (that, n, idd) {\r\n                n == -1 ? (that.Month == 1 ? (that.Year--, that.Month = 12) : that.Month--) : (that.Month == 12 ? (that.Year++, that.Month = 1) : that.Month++);\r\n                that.LD();\r\n                that.GOE(that, idd);\r\n            },\r\n            GOE: function (that, idd) {\r\n                this.bool = true;\r\n                var ty = $(\"#\" + idd.id + \"d\")[0];\r\n                var uet = ty.getElementsByTagName(\"li\");\r\n                that.D_U.value = that.Month;\r\n                that.D_Y.value = that.Year;\r\n                for (var i = 0; i < uet.length; i++) {\r\n                    uet[i].i = i;\r\n                    uet[i].onclick = function () {\r\n                        for (var i = 0; i < uet.length; i++) {\r\n                            uet[i].style.cssText = \"list-style-type:none; float:left; width:24px; height:22px;margin:2px 0px;line-height:22px; text-align:center;\";\r\n                        }\r\n                        that.D_R.value = (this.i + 1);\r\n                        uet[this.i].style.cssText = \"color:#0879e1;width:22px;height:20px;border:1px solid #0879e1; list-style-type: none; float:left;margin: 2px 0px; line-height: 22px; text-align: center; color:black;\"\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    </script>\r\n</head>\r\n<body>\r\n    <input id=\"ten\" type=\"text\" /><input type=\"button\" value=\"选择日期\" onclick=\"U.Date(ten)\" />\r\n    <input id=\"Text1\" type=\"text\" /><input type=\"button\" value=\"选择日期\" onclick=\"U.Date(Text1)\" />\r\n    <input id=\"Text2\" type=\"text\" /><input type=\"button\" value=\"选择日期\" onclick=\"U.Date(Text2)\" />\r\n</body>\r\n</html>\r\n"
    , "UCity": "﻿<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n    <title></title>\r\n    <meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\r\n    <!--1473基础js类-->\r\n    <script src=\"http://www.1473.cn/js/UC/UC23.js\" type=\"text/javascript\"></script>\r\n    <script src=\"http://nodejs.1473.cn/crossdomain.js\" type=\"text/javascript\"></script>\r\n    <link href=\"http://nodejs.1473.cn/css/UCity/U.City.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n    <script type=\"text/javascript\">\r\n        Namespace.register(\"U.City\"); //命名空间\r\n        window.onload = function () {\r\n            U.CD.Host = \"192.168.100.61\";           //需要更换数据库host，在这里更换\r\n            U.CD.Database = \"UseStudio_CityS\"; //需要更换数据库名字，在这里更换\r\n            U.CD.Init(); //初始化跨域文件\r\n            //其他初始化写在下面\r\n            //U.ACD.Request(U.CD.AjaxUrl, ([U.CD.Host, U.CD.Database, \"UC_S_Select_Sta\", '0']), U.Exam.aa_asyn, ([\"\", \"bb\"]));\r\n            //---------------------------db 为数据库名字, r为 存储过程函数， val为该存储过程的参数 若没有参数可以不传 若有多个参数采用数组的方法，\r\n            //-----------------------------------------------------------------------------------例如传入 [a,b] 查看下面 div文本为北京的元素\r\n            U.City($(\"#aa\")[0], $(\"#qq\")[0]);     //第一个参数是作为 放入哪个元素下 //第二个参数是元素点击提交数据\r\n        }\r\n        /*--------------------------------------------地区控件--------------------------------------------*/\r\n        U.City.first = function (Host, db) {\r\n            U.CD.Host = Host;           //需要更换数据库host，在这里更换\r\n            U.CD.Database = db; //需要更换数据库名字，在这里更换\r\n        }\r\n        U.CD.AsynJWH = function () { }\r\n        //-------------------------------------------------------------选择地区---------------------------------------------------------------\r\n        U.City = function (Udiv, Uit) {     //第一个参数为 放入哪个ID里面，   第二个参数为 onclick事件获取已选择的数据\r\n            var _UT = new U.CityT(Udiv, Uit);\r\n            _UT.init();\r\n            return _UT;\r\n        }\r\n        U.CityT = function (Udiv, Uit) {    //定义初始化值\r\n            this.Udiv = Udiv;\r\n            this.Uit = Uit;\r\n        }\r\n        U.CityT.prototype = {\r\n            init: function () {      //初始化\r\n                this.sumbit(this.Uit);\r\n                this.Odiv();\r\n            },\r\n            Odiv: function () {\r\n                var U_C_Out = $$(\"div\", { \"id\": \"U_C_Out\", \"className\": \"U_C_Out\" }, this.Udiv);\r\n                var U_C_O_L = $$(\"div\", { \"id\": \"U_C_O_L\", \"className\": \"U_C_O_L U_C_left\", \"innerHTML\": \"详细地址:\" }, U_C_Out);\r\n                var U_C_O_R = $$(\"div\", { \"id\": \"U_C_O_R\", \"className\": \"U_C_O_R U_C_right\" }, U_C_Out);\r\n                var U_C_O_C = $$(\"div\", { \"id\": \"U_C_O_C\", \"className\": \"U_C_O_C U_C_left\", \"innerHTML\": \"完善资料，让大家更了解你\" }, U_C_O_R);\r\n                var U_C_O_R_D = $$(\"div\", { \"id\": \"U_C_O_R_D\", \"className\": \"U_C_O_R_T U_C_right\", \"innerHTML\": \"编辑\", \"onclick\": [[this.view, ([this])]] }, U_C_O_R);\r\n            },\r\n            view: function (_this) {         //加载视图      整个选择地区的视图\r\n                //一系列的生成\r\n                var U_C_Out = $(\"#U_C_Out\").animate({ \"height\": \"150px\" }, 200);\r\n                var U_C_O_R = $(\"#U_C_O_R\")[0];\r\n                var U_C_Content = $$(\"div\", { \"id\": \"U_C_Content\", \"style\": { \"margin-top\": \"30px\"} }, U_C_Out);\r\n                $(\"#U_C_O_R_D\")[0].style.display = \"none\";\r\n                $(\"#U_C_O_C\")[0].style.display = \"none\";\r\n                $$(\"div\", { \"id\": \"U_C_O_R_P\", \"className\": \"U_C_O_R_T U_C_right\", \"innerHTML\": \"收起\", \"onclick\": [[_this.pickup, ([U_C_Content, \"C\"])]] }, U_C_O_R);\r\n                $$(\"div\", { \"id\": \"U_C_O_R_Remind\", \"className\": \"U_C_O_R_Remind\", \"innerHTML\": \"以下信息让您更方便让人了解\" }, U_C_Content)\r\n                var U_C_M_B_b = $$(\"div\", { \"id\": \"U_C_M_B_b\", \"className\": \"U_C_M_B_b U_C_left\" }, U_C_Content);\r\n                var U_C_M_B_big = $$(\"div\", { \"id\": \"U_C_M_B_big\", \"className\": \"U_C_M_B_big U_C_left\" }, U_C_M_B_b);\r\n                var U_C_M_B_b_t = $$(\"div\", { \"id\": \"U_C_M_B_b_t\", \"className\": \"U_C_M_B_b_t U_C_left\", \"innerHTML\": \"所在地\" }, U_C_M_B_big);\r\n                var U_C_M_B_Select = $$(\"div\", { \"id\": \"U_C_M_B_Select\", \"className\": \"U_C_M_B_Select U_C_left\" }, U_C_M_B_big);\r\n                var U_C_M_B_pro = $$(\"input\", { \"id\": \"U_C_M_B_pro\", \"className\": \"U_C_M_B_pro U_C_margin  U_C_left U_C_input\", \"type\": \"button\", \"value\": \"省/市\", \"onclick\": [[_this.pro, ([_this, \"U_C_M_B_pro\", 0])]] }, U_C_M_B_Select);\r\n                var U_C_M_B_city = $$(\"input\", { \"id\": \"U_C_M_B_city\", \"className\": \"U_C_M_B_city U_C_margin  U_C_left U_C_input\", \"type\": \"button\", \"value\": \"市/县\", \"onclick\": [[_this.pro, ([_this, \"U_C_M_B_city\", 1])]] }, U_C_M_B_Select);\r\n                var U_C_M_B_area = $$(\"input\", { \"id\": \"U_C_M_B_area\", \"className\": \"U_C_M_B_area U_C_margin  U_C_left U_C_input\", \"type\": \"button\", \"value\": \"乡/镇\", \"onclick\": [[_this.pro, ([_this, \"U_C_M_B_area\", 2])]] }, U_C_M_B_Select);\r\n                var U_C_M_L_Text = $$(\"div\", { \"id\": \"U_S_B_L_Text\", \"className\": \"U_S_B_L_Text\", \"style\": { \"margin-left\": \"11px\"} }, U_C_M_B_big);\r\n                var U_C_M_B_Text = $$(\"div\", { \"id\": \"U_C_M_B_Text\", \"className\": \"U_C_M_B_Text\", \"innerHTML\": \"找不到我家住址?\" }, U_C_M_L_Text);\r\n                U_C_M_B_Text.onclick = function () { U_C_M_B_input.focus() }\r\n                var U_C_M_B_input = $$(\"input\", { \"id\": \"U_S_B_L_input\", \"className\": \"U_C_B_L_input\", \"placeholder\": \"例：广东省深圳市龙岗区\", \"type\": \"text\" }, U_C_M_L_Text)\r\n            },\r\n            pro: function (_this, id, pro) {         //地区选择，访问后台得到数据\r\n                var U_C_N = pro == 0 ? 1 : (pro == 1 ? _this.Fsort : _this.City);         //父ID\r\n                var U_C_fp = pro == 0 ? 1 : (pro == 1 ? 2 : 3);     //判断当前传进来的是多少       深度\r\n                if (U_C_fp != 1 && _this.Fsort == undefined) {\r\n                    U_C_fp == 2 ? alert(\"请先选择省份\") : alert(\"请先选择城市\"); return;\r\n                }\r\n                U.ACD.Request(U.CD.AjaxUrl, ([U.CD.Host, U.CD.Database, \"UC_S_Select_Pro\", U_C_N, U_C_fp]), _this.visit, ([\"\", _this, id, pro]));\r\n            },\r\n            visit: function (r) {       //点击选择省份、城市、区域\r\n                var _this = r.context[1];\r\n                if (r.value[0].length == 0) { alert(\"该省份内区域正在开发中\"); $(\"#\" + r.context[2])[0].value = \"乡/镇\"; }  //如果改省份内没有区\r\n                else {\r\n                    var U_C_Parent = $$(\"div\", { \"id\": \"U_C_parent\", \"className\": \"U_C_parent\", \"style\": { \"left\": $(\"#\" + r.context[2])[0].offsetLeft + \"px\", \"top\": $(\"#\" + r.context[2])[0].offsetTop + 21 + \"px\"} }, _this.Udiv);\r\n                    $(\"body\")[0].onclick = function () { _this.destroy(_this, [U_C_Parent]) };\r\n                    for (var i = 0; i < r.value[0].length; i++) {\r\n                        $$(\"div\", { \"id\": \"U_C_C_Select_\" + i, \"className\": \"U_C_C_Select U_C_left\", \"innerHTML\": r.value[0][i].region_name, \"type\": \"button\", \"onclick\": [[_this.visitT, ([_this, r.value[0][i].region_id, r.value[0][i].region_name, r.context[2], U_C_Parent, r.context[3]])]] }, U_C_Parent);    //一系列的循环出数据用来判断当前省份\r\n                    }\r\n                }\r\n            },\r\n            visitT: function (_this, _Fsort, Ctitle, id, del, pro) {      //已经选择过的区域，获取他，存好值，用来选择下一项\r\n                $(\"#\" + id)[0].value = Ctitle;                  //选择的值代替当前的值\r\n                _this.destroy(_this, [del]);                      //销毁二级页面\r\n                if (pro == 0 || pro == 1) {                     //点击过的区域，重新选择，若选择的和之前不一样，则把已选好的值全部重新初始化\r\n                    if (_this.Fsort != _Fsort && pro == 0) {\r\n                        $(\"#U_C_M_B_city\")[0].value = \"市/县\";\r\n                        $(\"#U_C_M_B_area\")[0].value = \"乡/镇\";\r\n                    } else if (_this.City != _Fsort) {\r\n                        $(\"#U_C_M_B_area\")[0].value = \"乡/镇\";\r\n                    }\r\n                }\r\n                pro == 0 ? _this.Fsort = _Fsort : (pro == 1 ? _this.City = _Fsort : _this.area = _Fsort);       //判断当前选择到哪里了\r\n            },\r\n            pickup: function (del, str) {\r\n                $(\"#U_\" + str + \"_Out\").animate({ \"height\": \"24px\" }, 200);\r\n                $(\"#U_\" + str + \"_Content\")[0].innerHTML = \"\";\r\n                del.parentNode.removeChild(del);\r\n                $(\"#U_\" + str + \"_O_R_P\")[0].parentNode.removeChild($(\"#U_\" + str + \"_O_R_P\")[0]);\r\n                $(\"#U_\" + str + \"_O_R_D\")[0].style.display = \"block\";\r\n                $(\"#U_\" + str + \"_O_C\")[0].style.display = \"block\";\r\n            },\r\n            destroy: function (_this, del) {  //销毁二级页面\r\n                for (var i = 0; i < del.length; i++) {\r\n                    del[i].parentNode.removeChild(del[i]);    //通过父元素移除子元素\r\n                }\r\n            },\r\n            sumbit: function (Uit) {                   //这里是返回一个数组，  数组的值是用户选择的值\r\n                Uit.onclick = (function (that) {\r\n                    return function () {\r\n                        if ($(\"#U_C_M_B_city\")[0].value == \"市/县\" || $(\"#U_C_M_B_area\")[0].value == \"乡/镇\" || $(\"#U_C_M_B_pro\")[0].value == \"省/市\") {\r\n                            return alert(\"请完善信息\");\r\n                        }\r\n                        var arr = [$(\"#U_C_M_B_pro\")[0].value, $(\"#U_C_M_B_city\")[0].value, $(\"#U_C_M_B_area\")[0].value]; //组成数组\r\n                        return alert(arr);\r\n                    }\r\n                })(this)\r\n            }\r\n        }\r\n    </script>\r\n</head>\r\n<body>\r\n    <div id=\"aa\" style=\"width: 30%; height: 790px; position: absolute; left: 50px; top: 10px\">\r\n    </div>\r\n    <div id=\"qq\" style=\"width: 100px; height: 100px; background-color: red; position: absolute;\r\n        top: 300px\">\r\n    </div>\r\n</body>\r\n</html>\r\n"
    , "UColor": "﻿<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n    <title></title>\r\n    <script type=\"text/javascript\">        document.domain = \"1473.cn\";</script>\r\n    <script src=\"http://www.1473.cn/js/UC/UC23.js\" type=\"text/javascript\"></script>\r\n    <script>\r\n        U.Color = function (id) {\r\n            var _C = new U.ColorT();\r\n            _C.Sel(id);\r\n        }\r\n        U.ColorT = function () { }\r\n        U.ColorT.prototype = {\r\n            Sel: function (id) {\r\n                if ($(\"#box\")[0]) { document.body.removeChild(that.Box); }\r\n                var _c = [\"#ffffff\", \"#ffccc9\", \"#ffce93\", \"#fffc9e\", \"#ffffc7\", \"#9aff99\", \"#96fffb\", \"#cdffff\", \"#cbcefb\", \"#cfcfcf\", \"#fd6864\", \"#fe996b\", \"#fffe65\", \"#fcff2f\", \"#67fd9a\", \"#38fff8\", \"#68fdff\", \"#9698ed\", \"#c0c0c0\", \"#fe0000\", \"#f8a102\", \"#ffcc67\", \"#f8ff00\", \"#34ff34\", \"#68cbd0\", \"#34cdf9\", \"#6665cd\", \"#9b9b9b\", \"#cb0000\", \"#f56b00\", \"#ffcb2f\", \"#ffc702\", \"#32cb00\", \"#00d2cb\", \"#3166ff\", \"#6434fc\", \"#656565\", \"#9a0000\", \"#ce6301\", \"#cd9934\", \"#999903\", \"#009901\", \"#329a9d\", \"#3531ff\", \"#6200c9\", \"#343434\", \"#680100\", \"#963400\", \"#986536\", \"#646809\", \"#036400\", \"#34696d\", \"#00009b\", \"#303498\", \"#000000\", \"#330001\", \"#643403\", \"#663234\", \"#343300\", \"#013300\", \"#003532\", \"#010066\", \"#340096\"];\r\n                var Box = $$(\"div\", { \"id\": \"box\" }, document.body);\r\n                for (var i = 0; i < _c.length; i++) {\r\n                    var rgb = $$(\"div\", { \"onclick\": [[this.Oel, ([this, id])]], \"style\": { \"float\": \"left\", \"width\": \"15px\", \"height\": \"15px\", \"margin\": \"2px\", \"background\": _c[i]} }, Box);\r\n                    if ((i + 1) % 9 == 0) {\r\n                        $$(\"br\", { \"style\": { \"clear\": \"both\"} }, Box);\r\n                    }\r\n                }\r\n                this.Box = Box;\r\n            },\r\n            Oel: function (that, id) {\r\n                $(\"#\" + id.id)[0].style.background = this.style.background;\r\n                document.body.removeChild(that.Box);\r\n            }\r\n        }\r\n    \r\n    </script>\r\n</head>\r\n<body>\r\n    <div id=\"color\" style=\"width: 80px; height: 30px;\" onclick=\"U.Color(color);\">\r\n        颜色</div>\r\n</body>\r\n</html>\r\n"
    , "USchool": "﻿<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n    <title></title>\r\n    <meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\r\n    <!--1473基础js类-->\r\n    <script src=\"http://www.1473.cn/js/UC/UC23.js\" type=\"text/javascript\"></script>\r\n    <script src=\"http://nodejs.1473.cn/crossdomain.js\" type=\"text/javascript\"></script>\r\n    <script src=\"http://nodejs.1473.cn/js/UCity/U.City.js\" type=\"text/javascript\"></script>\r\n    <link href=\"http://nodejs.1473.cn/css/UCity/U.City.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n    <script type=\"text/javascript\">\r\n        Namespace.register(\"U.School\"); //命名空间\r\n        window.onload = function () {\r\n            U.CD.Host = \"192.168.100.61\";           //需要更换数据库host，在这里更换\r\n            U.CD.Database = \"UseStudio_CityS\"; //需要更换数据库名字，在这里更换\r\n            U.CD.Init(); //初始化跨域文件\r\n            //其他初始化写在下面\r\n            //U.ACD.Request(U.CD.AjaxUrl, ([U.CD.Host, U.CD.Database, \"UC_S_Select_Sta\", '0']), U.Exam.aa_asyn, ([\"\", \"bb\"]));\r\n            //---------------------------db 为数据库名字, r为 存储过程函数， val为该存储过程的参数 若没有参数可以不传 若有多个参数采用数组的方法，\r\n            //-----------------------------------------------------------------------------------例如传入 [a,b] 查看下面 div文本为北京的元素\r\n            U.School($(\"#aa\")[0]);\r\n        }\r\n        var City = new U.CityT();   //调用地区控件\r\n\r\n\r\n        U.School = function (Udiv) {\r\n            var _UT = new U.SchoolT(Udiv);\r\n            _UT.init();\r\n            return _UT;\r\n        }\r\n        U.SchoolT = function (Udiv) {\r\n            this.Udiv = Udiv;\r\n        }\r\n        U.SchoolT.prototype = {\r\n            init: function () {\r\n                this.Odiv();\r\n            },\r\n            Odiv: function () {\r\n                this.winWidth = document.body.offsetWidth\r\n                var U_S_Out = $$(\"div\", { \"id\": \"U_S_Out\", \"className\": \"U_C_Out\" }, this.Udiv);\r\n                var U_S_O_L = $$(\"div\", { \"id\": \"U_S_O_L\", \"className\": \"U_C_O_L U_C_left\", \"innerHTML\": \"教育信息:\" }, U_S_Out);\r\n                var U_S_O_R = $$(\"div\", { \"id\": \"U_S_O_R\", \"className\": \"U_C_O_R U_C_right\" }, U_S_Out);\r\n                var U_S_O_C = $$(\"div\", { \"id\": \"U_S_O_C\", \"className\": \"U_C_O_C U_C_left\", \"innerHTML\": \"未填写教育信息\" }, U_S_O_R);\r\n                var U_S_O_R_D = $$(\"div\", { \"id\": \"U_S_O_R_D\", \"className\": \"U_C_O_R_T U_C_right\", \"innerHTML\": \"编辑\", \"onclick\": [[this.view, ([this])]] }, U_S_O_R);\r\n            },\r\n            view: function (_this) {\r\n                var r = U.ACD.Request(U.CD.AjaxUrl, ([U.CD.Host, U.CD.Database, \"US_S_Select_place\"]), \"\", ([\"\", \"bb\", _this]));\r\n                var U_S_Out = $(\"#U_S_Out\").animate({ \"height\": \"100px\" }, 200);\r\n                var U_S_Content = $$(\"div\", { \"id\": \"U_S_Content\", \"className\": \"U_S_Content\" }, U_S_Out);\r\n                var U_S_O_R = $(\"#U_S_O_R\")[0];\r\n                $(\"#U_S_O_R_D\")[0].style.display = \"none\";\r\n                $(\"#U_S_O_C\")[0].style.display = \"none\";\r\n                $$(\"div\", { \"id\": \"U_S_O_R_P\", \"className\": \"U_C_O_R_T U_C_right\", \"innerHTML\": \"收起\", \"onclick\": [[City.pickup, ([U_S_Content, \"S\"])]] }, U_S_O_R);\r\n                $$(\"div\", { \"id\": \"U_S_O_R_Remind\", \"className\": \"U_C_O_R_Remind\", \"innerHTML\": \"填写教育信息，能帮助你在微博上快速找到许久不见的老同学\" }, U_S_Content)\r\n                var U_S_Content_D = $$(\"div\", { \"id\": \"U_S_Content_D\", \"className\": \"U_S_Content_D\" }, U_S_Content);\r\n                $$(\"div\", { \"innerHTML\": \"学校名称\", \"className\": \"U_S_T_right U_C_left\", \"style\": { \"width\": \"55px\"} }, U_S_Content_D);\r\n                var U_S_icon = $$(\"div\", { \"id\": \"U_S_icon\", \"className\": \"U_S_icon\" }, U_S_Content_D)\r\n                var U_S_input = $$(\"input\", { \"className\": \"U_S_input\", \"type\": \"text\", \"id\": \"U_S_input\", \"placeholder\": \"点击选择学校\", \"onclick\": [[_this.place, ([r])]] }, U_S_icon)\r\n                if (_this.value) {\r\n                    U_S_input.value = _this.value;\r\n                }\r\n            },\r\n            place: function (r) {\r\n                $(\"#U_S_input\")[0].blur();\r\n                var U_S_N_D = $$(\"div\", { \"id\": \"U_S_N_D\", \"className\": \"U_S_N_D\", \"style\": { \"width\": US.Width + \"px\", \"height\": US.Height + \"px\"} }, $(\"body\")[0])\r\n                var U_S_N_B = $$(\"div\", { \"id\": \"U_S_N_B\", \"className\": \"U_S_N_B\", \"style\": { \"left\": (US.Width - 860) / 2 + \"px\", \"top\": (US.Height - 392) / 2 + \"px\"} }, $(\"body\")[0]);\r\n                var U_S_Title = $$(\"div\", { \"className\": \"U_S_Title\" }, U_S_N_B)\r\n                $$(\"div\", { \"innerHTML\": \"选择学校\", \"title\": \"选择学校\", \"className\": \"U_C_left\" }, U_S_Title);\r\n                $$(\"div\", { \"id\": \"U_S_B_Close\", \"className\": \"U_S_B_Close U_C_right\", \"onclick\": [[City.destroy, ([\"\", [U_S_N_D, U_S_N_B]])]], \"innerHTML\": \"×\" }, U_S_Title)\r\n                var U_S_B = $$(\"div\", { \"id\": \"U_S_B\", \"className\": \"U_S_B\" }, U_S_N_B);\r\n                var U_S_B_L_T = $$(\"div\", {}, U_S_B);\r\n                $$(\"div\", { \"innerHTML\": \"城市选择:\", \"className\": \"U_S_color U_C_left\" }, U_S_B_L_T);\r\n                $$(\"div\", { \"innerHTML\": \"学校选择:\", \"className\": \"U_S_color U_C_left\", \"style\": { \"margin-left\": \"190px\"} }, U_S_B_L_T);\r\n                var U_S_B_L = $$(\"div\", { \"id\": \"U_S_B_L\", \"className\": \"U_S_B_L U_C_left\" }, U_S_B);\r\n                var U_S_B_L_Pro = $$(\"div\", {}, U_S_B_L)\r\n                for (var i = 0; i < r.value[0].length; i++) {\r\n                    var U_S_Select = $$(\"div\", { \"id\": \"U_S_Select_\" + i, \"className\": \"U_S_Select U_C_left U_C_Select\", \"innerHTML\": r.value[0][i].place, \"onclick\": [[r.context[2].call, ([[r.value[0][i].place, r.context[2], \"U_S_Select_\" + i]])]] }, U_S_B_L_Pro)\r\n                    if (r.value[0][i].place == r.context[2].area) {\r\n                        U_S_Select.style.border = \"1px solid #A6A1A1\";\r\n                    }\r\n                }\r\n                var U_S_B_L_Text = $$(\"div\", { \"id\": \"U_S_B_L_Text\", \"className\": \"U_S_B_L_Text\" }, U_S_B_L);\r\n                var U_S_B_L_Nofind = $$(\"div\", { \"innerHTML\": \"找不到我学校?\", \"className\": \"U_C_M_B_Text U_S_B_L_Nofind\" }, U_S_B_L_Text);\r\n                var U_S_B_L_input = $$(\"input\", { \"id\": \"U_S_B_L_input\", \"className\": \"U_C_B_L_input U_S_B_L_input\", \"placeholder\": \"例子：广东-深圳技师学院\", \"type\": \"text\" }, U_S_B_L_Text)\r\n                var U_S_B_L_submit = $$(\"div\", { \"id\": \"U_S_B_L_submit\", \"className\": \"U_S_B_L_submit\" }, U_S_B_L_Text)\r\n                var U_S_B_L_submit_t = $$(\"div\", { \"innerHTML\": \"确定\", \"onclick\": [[r.context[2].YOrF, ([U_S_B_L_input, r])]] }, U_S_B_L_submit)\r\n                U_S_B_L_Nofind.onclick = function () { U_S_B_L_input.focus() }\r\n                var U_S_B_R = $$(\"div\", { \"id\": \"U_S_B_R\", \"className\": \"U_S_B_R U_C_left\" }, U_S_B);\r\n                U.ACD.Request(U.CD.AjaxUrl, ([U.CD.Host, U.CD.Database, \"US_S_Select_school\", r.context[2].area ? r.context[2].area : \"北京\"]), r.context[2].school, ([\"\", \"bb\", r.context[2], \"北京\"]));\r\n            },\r\n            call: function (r) {\r\n                for (var i = 0; i < 33; i++) {\r\n                    $(\"#U_S_Select_\" + i)[0].className = \"U_S_Select U_C_left U_C_Select\";\r\n                }\r\n                $(\"#\" + r[2])[0].className = \"U_S_Select U_C_left border U_C_Select\";\r\n                U.ACD.Request(U.CD.AjaxUrl, ([U.CD.Host, U.CD.Database, \"US_S_Select_school\", r[0]]), r[1].school, ([\"\", \"bb\", r]));\r\n            },\r\n            YOrF: function (str, r) {\r\n                var S = str.value.split(\"-\");\r\n                var flg = false;\r\n                var reg = /[\\u4E00-\\u9FA5\\uF900-\\uFA2D]/;\r\n                if (S.length != 2) { alert(\"填下信息有错，例子：广东-深圳技师学院\"); return; }\r\n                for (var i = 0; i < r.value[0].length; i++) {\r\n                    if (r.value[0][i].place == S[0]) { flg = true; break; }\r\n                }\r\n                if (flg == true) {\r\n                    if (reg.test(S[1])) {\r\n                        r.context[2].result([S[1], S[0], r.context[2]]);\r\n                    }\r\n                } else { alert(\"输入的省份有错\"); }\r\n            },\r\n            school: function (r) {\r\n                U_S_B_R.innerHTML = \"\";\r\n                var city, _this;\r\n                r.context[3] != undefined ? city = r.context[3] : city = r.context[2][0];\r\n                r.context[2][1] != undefined ? _this = r.context[2][1] : _this = r.context[2];\r\n                for (var k = 0; k < r.value[0].length; k++) {\r\n                    $$(\"div\", { \"id\": \"U_S_School_\" + k, \"className\": \"U_S_School U_C_left\", \"innerHTML\": r.value[0][k].name, \"onclick\": [[_this.result, ([[r.value[0][k].name, city, _this]])]] }, U_S_B_R);\r\n                }\r\n            },\r\n            result: function (r) {\r\n                $(\"#U_S_N_B\")[0].parentNode.removeChild($(\"#U_S_N_B\")[0]);\r\n                $(\"#U_S_N_D\")[0].parentNode.removeChild($(\"#U_S_N_D\")[0]);\r\n                r[2].area = r[1];\r\n                $(\"#U_S_input\")[0].value = r[2].value = r[0];\r\n                $(\"#U_S_O_C\")[0].innerHTML = r[0];\r\n            }\r\n        }\r\n\r\n    </script>\r\n</head>\r\n<body>\r\n    <div id=\"aa\" style=\"width: 30%; height: 790px; position: absolute; left: 50px; top: 10px\">\r\n    </div>\r\n    <div id=\"qq\" style=\"width: 100px; height: 100px; background-color: red; position: absolute;\r\n        top: 300px\">\r\n    </div>\r\n</body>\r\n</html>\r\n"
    , "UformJs": "﻿<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n    <title></title>\r\n    <!--js库引用-->\r\n    <script src=\"http://www.1473.cn/uform.js\" type=\"text/javascript\"></script>\r\n    <script type=\"text/javascript\">\r\n        window.onload = function () {//页面起始，相当于C语言中的main函数\r\n            /*\r\n            原生JS写法与引用js库写法比较\r\n            $：获取元素\r\n            #：通过id获取\r\n            .：通过classname获取\r\n            animate：执行动画操作\r\n            getElementsByTagName：通过标签获取元素\r\n            appendChild：在XX标签下添加元素\r\n            */\r\n            //-----------------------------HTML 元素选取\r\n            var _ConOne = document.getElementById(\"_TestOne\").innerHTML; //原生js获取_TestOne内容\r\n            var _ConTwo = $(\"#_TestTwo\")[0].innerHTML; //引用js库获取_TestTwo内容\r\n            alert(_ConOne + \",\" + _ConTwo); //弹窗，内容为_TestOne内容+_TestTwo内容\r\n            //-----------------------------HTML 元素操作\r\n            document.getElementById(\"_TestThree\").style.backgroundColor = \"red\"; //原生js获取_TestThree元素并修改背景颜色\r\n            $(\"#_TestFour\")[0].style.backgroundColor = \"green\"; //引用js库获取_TestFour元素并修改背景颜色\r\n            //-----------------------------CSS 操作\r\n            document.getElementById(\"_TestFive\").style.cssText = \"color:pink;\"; //原生js获取_TestFive元素并添加样式样式为字体颜色是粉色\r\n            $(\"#_TestSix\")[0].style.cssText = \"color:orange\"; //引用js库获取_TestSix元素并添加样式样式为字体颜色是粉色\r\n            //-----------------------------HTML 事件函数\r\n            document.getElementById(\"_TestSeven\").onclick = function () { alert(_ConOne); }; //原生js获取_TestSeven元素并添加单击事件，弹窗，内容为变量_ConOne的值\r\n            $(\"#_TestEight\")[0].onclick = function () { alert(_ConTwo); } //引用js库获取_TestEight元素并添加单击事件，弹窗，内容为变量_ConTwo的值\r\n            //-----------------------------JavaScript 特效和动画\r\n            function AniTest() {//原生js执行计时器将元素透明度改为零，函数内容不用明白\r\n                var _Nine = document.getElementById(\"_TestNine\");\r\n                _Nine.style.opacity = 1;\r\n                var _Timer = null;\r\n                function AniTimer() {\r\n                    _Timer = setInterval(animate, 100);\r\n                }\r\n                function animate() {\r\n                    if (_Nine.style.opacity != 0) {\r\n                        _Nine.style.opacity = _Nine.style.opacity - 0.1;\r\n                    } else {\r\n                        clearInterval(_Timer);\r\n                        alert(\"Nine已经变透明了\");\r\n                    }\r\n                }\r\n                AniTimer();\r\n            }\r\n            AniTest();\r\n            $('#_TestTen').animate({ 'opacity': \"0\" }, 200, function () { alert(\"Ten已经变透明了\"); }); //引用js库执行计时器将元素透明度改为零并执行回调函数\r\n            //-----------------------------HTML DOM 遍历和修改\r\n            document.getElementsByTagName(\"p\")[0].onclick = function () { alert(_ConOne); } //原生js获取p标签的元素并添加单击事件\r\n            $('span', $('body')[0])[0].onclick = function () { alert(_ConTwo); } //引用js库获取span标签的元素并添加单击事件\r\n            //-----------------------------HTML DOM 元素创建\r\n            var _TestThirteen = document.createElement(\"div\"); //原生js创建div\r\n            _TestThirteen.style.backgroundColor = \"Gray\"; //为元素添加背景颜色\r\n            _TestThirteen.innerHTML = \"Thirteen\"; //为元素添加内容\r\n            _TestThirteen.onclick = function () { alert(_ConOne); } //为元素添加单击事件\r\n            document.body.appendChild(_TestThirteen); //将元素添加入body标签\r\n            $$(\"div\", { \"innerHTML\": \"Fourteen\", \"style\": { \"background-color\": \"pink\" }, \"onclick\": [[function () { alert(_ConTwo); } ]] }, $('body')[0]); //引用js库创建元素、为元素添加背景颜色、为元素添加内容、为元素添加单击事件、将元素添加入body标签\r\n        }\r\n    </script>\r\n</head>\r\n<body>\r\n    <div id=\"_TestOne\">\r\n        One\r\n    </div>\r\n    <div id=\"_TestTwo\">\r\n        Two\r\n    </div>\r\n    <div id=\"_TestThree\">\r\n        Three\r\n    </div>\r\n    <div id=\"_TestFour\">\r\n        Four\r\n    </div>\r\n    <div id=\"_TestFive\">\r\n        Five\r\n    </div>\r\n    <div id=\"_TestSix\">\r\n        Six\r\n    </div>\r\n    <div id=\"_TestSeven\">\r\n        Seven\r\n    </div>\r\n    <div id=\"_TestEight\">\r\n        Eight\r\n    </div>\r\n    <div id=\"_TestNine\">\r\n        Nine\r\n    </div>\r\n    <div id=\"_TestTen\">\r\n        Ten\r\n    </div>\r\n    <p id=\"_TestEleven\">\r\n        Eleven</p>\r\n    <span id=\"_TestTwelve\">Twelve</span>\r\n</body>\r\n</html>\r\n"
}
