123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400 |
- //注册编程控件js,这个js比较复杂,以后再详细细分每个控件。暂时可以写在一块。。
- //
- Namespace.register("U.CD.C");
- //构建botton按钮
- U.CD.C.Button = function () {
- return $$("input", { "type": "button", "style": { "cssText": "width:120px; height:25px; position:absolute;" }, "value": "按钮" });
- }
- //构建Div --钟泽锋
- U.CD.C.Div = function () {
- return $$("div", { "style": { "cssText": "width:80px; height:80px; line-height:80px; color:white; background-color:blue; text-align:center; position:absolute;" }, "innerHTML": "最基本元素" });
- }
- //构建img --钟泽锋
- U.CD.C.Img = function () {
- return $$("img", { "style": { "cssText": "width:200px; height:200px; text-align:center; position:absolute;" }, "src": "http://d.1473.cn/images/cloudlogo.png" });
- }
- //构建textarea --钟泽锋
- U.CD.C.Textarea = function () {
- return $$("textarea", { "style": { "cssText": "width:360px; height:160px; border:1px solid gray; position:absolute;" }, "value": "文本域" });
- }
- //构建reset按钮 --洪超彬
- U.CD.C.Reset = function () {
- return $$("input", { "type": "reset", "style": { "cssText": "width:120px; height:25px; position:absolute;" }, "value": "重置" });
- }
- //构建reset按钮 --洪超彬
- U.CD.C.Submit = function () {
- return $$("input", { "type": "submit", "style": { "cssText": "width:120px; height:25px; position:absolute;" }, "value": "提交" });
- }
- //构建text文本框 --洪超彬
- U.CD.C.Text = function () {
- return $$("input", { "type": "text", "style": { "cssText": "width:150px; height:25px; position:absolute;"} });
- }
- //构建password文本框 --洪超彬
- U.CD.C.Password = function () {
- return $$("input", { "type": "password", "style": { "cssText": "width:150px; height:25px; position:absolute;"} });
- }
- //构建radio按钮 --洪超彬
- U.CD.C.Radio = function () {
- return $$("input", { "type": "radio", "style": { "cssText": "position:absolute;"} });
- }
- //构建checkbox按钮 --洪超彬
- U.CD.C.Checkbox = function () {
- return $$("input", { "type": "checkbox", "style": { "cssText": "position:absolute;"} });
- }
- //构建p --钟泽锋
- U.CD.C.P = function () {
- return $$("p", { "style": { "cssText": " position:absolute; " }, "innerHTML": "这是一个段落" });
- }
- //构建h --钟泽锋
- U.CD.C.H = function () {
- return $$("h3", { "style": { "cssText": " position:absolute;" }, "innerHTML": "这是一个标题" });
- }
- //构建select --钟泽锋
- U.CD.C.Select = function () {
- //return $$("select", { "style": { "cssText": " position:absolute;" }, "innerHTML": "<option value=0>一月</option><option value=1>二月</option><option value=2>三月</option><option value=3>四月</option>" });
- //如果还有地方需要弹出,还可以继续封装。
- /*var _UFFD = $$("div", { "className": "UCD_TR_CP" }); //调用主项目对话框,并构建一个显示用的Div。
- $$("div", { "className": "UCD_TR_CP_MS", "innerHTML": "请输入选项个数:" }, _UFFD); //项目名称输入input 传最后一个参数_UFFD的是将input加入_UFFD中
- var _h = $$("input", { "className": "UCD_RT_CP_Input" }, _UFFD); //行
- var P = ([_UDPD, _L, _T, _h]); //参数数组
- //创建项目一定是在根元素下面。
- var _CUM = new U.UF.UI.Dialog(null, null, "创建Select", 350, "", "", "", "", "", U.M.apply(_UFFD, [[U.CD.C.SelectAsyn, P]]), _UFFD, ""); //js太智能了,可以自由拼凑参数!
- U.D.PopupWindow(_CUM.Create());*/
- var arr = new Array("操作", "设置栏目", "更多设置", "更多选项"); //保存下拉列表内容的数组
- var _s = $$("select", { "style": { "cssText": "position:absolute;"} }); //创建select元素
- for (var i = 0; i < arr.length; i++) {//根据数组大小创建option
- var _o = $$("option", { "style": {}, "innerHTML": arr[i] }, _s); //创建option
- }
- return _s; //返回select
- }
- //select弹窗异步函数 --钟泽锋 --暂时不使用
- U.CD.C.SelectAsyn = function (_UDPD, _L, _T, _h) {
- var a = new Array("操作", "设置栏目", "更多设置", "更多选项"); //保存选项内容的数组
- var _h = parseInt(_h.value); //option选项个数
- if (_h >= 20 || _h <= 0) { alert("请输入正确数值0-20。"); return; } //选项个数大于0不大于20
- var _s = $$("select", { "style": { "cssText": "position:absolute;"} }); //创建select元素
- for (var i = 0; i < _h; i++) {//根据传入数量创建option
- var _o = $$("option", { "style": {}, "innerHTML": i }, _s); //创建option
- }
- U.CD.L.AppendIF(_s, _UDPD, _L, _T); //将select加入编辑区域
- }
- //构建Table --钟泽锋
- U.CD.C.Table = function (_UDPD, _L, _T) {
- //如果还有地方需要弹出,还可以继续封装。
- var _UFFD = $$("div", { "className": "UCD_TR_CP" }); //调用主项目对话框,并构建一个显示用的Div。
- $$("div", { "className": "UCD_TR_CP_MS", "innerHTML": "请输入行数:" }, _UFFD); //项目名称输入input 传最后一个参数_UFFD的是将input加入_UFFD中
- var _h = $$("input", { "className": "UCD_RT_CP_Input" }, _UFFD); //行
- $$("div", { "className": "UCD_TR_CP_MS", "innerHTML": "请输入列数:" }, _UFFD); //项目名称输入input
- var _l = $$("input", { "className": "UCD_RT_CP_Input" }, _UFFD); //列
- var P = ([_UDPD, _L, _T, _h, _l]); //参数数组
- //创建项目一定是在根元素下面。
- var _CUM = new U.UF.UI.Dialog("创建表格Table", { "width": "350px" }, null, U.M.apply(_UFFD, [[U.CD.C.TableAsyn, P]]), _UFFD); //js太智能了,可以自由拼凑参数!
- U.D.PopupWindow(_CUM.Create());
- }
- //表格弹窗异步函数。也就是单击了弹出窗体确认按钮后触发的事件。
- U.CD.C.TableAsyn = function (_UDPD, _L, _T, _h, _l) {
- var _h = parseInt(_h.value); //行
- var _l = parseInt(_l.value); //列
- if (_h <= 0 || _l <= 0) { alert("请输入正确数值(0-30)"); return; } //行数列数不小于0
- if (_h > 30 || _l > 30) { alert("数值过大(0-30)"); return; } //行数列数不大于30
- var str = ""
- var i, j; //i:列数,j:行数
- for (i = 0; i < _h; i++) {//根据行数列数构建table中的内容
- str += "<tr style='border:1px solid green;'>";
- for (j = 0; j < _l; j++) {
- str += "<td style='border:1px solid green;'> </td>";
- }
- str += "</tr>";
- }
- var _t = $$("table", { "style": { "cssText": "width:300px; height:200px; position:absolute; border:1px solid blue;"} }); //创建一个table并设置css样式
- U.CD.C.IETable(_t, str); //调用setTableInnerHTML方法为table加入内容(方法用于解决ie6-ie9不支持table的innerHTML问题)
- U.CD.L.AppendIF(_t, _UDPD, _L, _T); //调用追加函数追加到iframe中
- }
- //*向指定table加入html代码(解决ie6-ie9不支持table的innerHTML问题)--钟泽锋
- U.CD.C.IETable = function (table, html) {
- if (navigator && navigator.userAgent.match(/msie/i)) {
- var temp = table.ownerDocument.createElement('div');
- temp.innerHTML = '<table><tbody>' + html + '</tbody></table>'; //ie6-ie9不支持table的innerHTML问题,在table中加入tbody标签可以解决
- if (table.tBodies.length == 0) {
- var tbody = document.createElement("tbody");
- table.appendChild(tbody);
- }
- table.replaceChild(temp.firstChild.firstChild, table.tBodies[0]);
- } else {
- table.innerHTML = html;
- }
- }
- //构建ol --钟泽锋
- U.CD.C.Ol = function (_UDPD, _L, _T) {
- var _UFFD = $$("div", { "className": "UCD_TR_CP", "id": "UCD_TR_CPOL" }); //调用主项目对话框,并构建一个显示用的Div。
- $$("div", { "className": "UCD_TR_CP_MS", "innerHTML": "请输入列表行数:" }, _UFFD); //项目名称输入input 传最后一个参数_UFFD的是将input加入_UFFD中
- var _h = $$("input", { "className": "UCD_RT_CP_Input" }, _UFFD); //行
- var P = ([_UDPD, _L, _T, _h]); //参数数组
- //创建项目一定是在根元素下面。
- var _CUM = new U.UF.UI.Dialog("创建Ol", { "width": "350px"}, null, U.M.apply(_UFFD, [[U.CD.C.OlAsyn, P]]), _UFFD); //js太智能了,可以自由拼凑参数!
- //this.parentElement.parentElement.parentElement.remove() ;
- U.D.PopupWindow(_CUM.Create());
- }
- //构建ul --钟泽锋
- U.CD.C.Ul = function (_UDPD, _L, _T) {
- var _UFFD = $$("div", { "className": "UCD_TR_CP" }); //调用主项目对话框,并构建一个显示用的Div。
- $$("div", { "className": "UCD_TR_CP_MS", "innerHTML": "请输入列表行数:" }, _UFFD); //项目名称输入input 传最后一个参数_UFFD的是将input加入_UFFD中
- var _h = $$("input", { "className": "UCD_RT_CP_Input" }, _UFFD); //行
- var P = ([_UDPD, _L, _T, _h]); //参数数组
- //创建项目一定是在根元素下面。
- var _CUM = new U.UF.UI.Dialog("创建Ul", { "width": "350px" }, null, U.M.apply(_UFFD, [[U.CD.C.UlAsyn, P]]), _UFFD); //js太智能了,可以自由拼凑参数!
- U.D.PopupWindow(_CUM.Create());
- }
- //有序列表弹窗异步函数 --钟泽锋
- U.CD.C.OlAsyn = function (_UDPD, _L, _T, _h) {
- var a = new Array("新闻资讯", "体育竞技", "娱乐八卦", "前沿科技", "环球财经", "天气预报", "房产家居", "网络游戏"); //保存列表内容的数组
- var _h = parseInt(_h.value); //li行数
- if (_h >= 20 || _h <= 0) { alert("请输入正确数值0-20。"); return; }
- var _s = $$("ol", { "style": { "cssText": "position:absolute;"} }); //创建ol
- for (var i = 0; i < _h; i++) {//根据数组总数创建li
- var _o = $$("li", { "style": {}, "innerHTML": a[i] }, _s);
- }
- U.CD.L.AppendIF(_s, _UDPD, _L, _T); //调用追加函数追加到iframe中
- $("#UCD_TR_CPOL")[0].parentElement.parentElement.parentElement.remove();
- }
- //无序列表弹窗异步函数 --钟泽锋
- U.CD.C.UlAsyn = function (_UDPD, _L, _T, _h) {
- var a = new Array("新闻资讯", "体育竞技", "娱乐八卦", "前沿科技", "环球财经", "天气预报", "房产家居", "网络游戏"); //保存列表内容的数组
- var _h = parseInt(_h.value); //li行数
- if (_h >= 20 || _h <= 0) { alert("请输入正确数值0-20。"); return; }
- var _s = $$("ul", { "style": { "cssText": "position:absolute;"} }); //创建ul
- for (var i = 0; i < _h; i++) {//根据数组总数创建li
- var _o = $$("li", { "style": { "list-style-type": "disc" }, "innerHTML": a[i] }, _s); //创建li
- }
- U.CD.L.AppendIF(_s, _UDPD, _L, _T); //调用追加函数追加到iframe中
- }
- //构建导航navigation bar --钟泽锋
- U.CD.C.Navigation = function () {
- var _nav = $$("div", { "style": { "cssText": " position:absolute;"} }); //创建div用于包含导航项
- var _a1 = $$("a", { "innerHTML": "首页", "href": "#", "style": { "cssText": "margin-left:10px;"} }, _nav); //添加导航项
- var _a2 = $$("a", { "innerHTML": "资料", "href": "#", "style": { "cssText": "margin-left:10px;"} }, _nav);
- var _a3 = $$("a", { "innerHTML": "信息", "href": "#", "style": { "cssText": "margin-left:10px;"} }, _nav);
- var _hr = $$("hr", { "style": { "cssText": "width:300px;"} }, _nav);
- return _nav;
- }
- //构建分页列表 --钟泽锋
- U.CD.C.Pagination = function () {
- var _page = $$("div", { "style": { "cssText": " position:absolute;"} }); //创建div用于包含分页列表
- var _ul = $$("div", { "style": { "cssText": "margin:10px;"} }, _page);
- var _liprev = $$("div", { "innerHTML": "上一页", "href": "#", "style": { "cssText": "color:#5AA3CE; width:75px; height:25px; line-height:25px; text-align:center; border:1px solid #DDDDDD;list-style:none; float:left;"} }, _ul);
- var _li1 = $$("div", { "innerHTML": "1", "href": "#", "style": { "cssText": "color:#5AA3CE; width:25px; height:25px; line-height:25px; text-align:center; border:1px solid #DDDDDD; list-style:none; float:left;"} }, _ul);
- var _li2 = $$("div", { "innerHTML": "2", "href": "#", "style": { "cssText": "color:#5AA3CE;width:25px; height:25px; line-height:25px; text-align:center; border:1px solid #DDDDDD; list-style:none; float:left;"} }, _ul);
- var _li3 = $$("div", { "innerHTML": "3", "href": "#", "style": { "cssText": "color:#5AA3CE;width:25px; height:25px; line-height:25px; text-align:center; border:1px solid #DDDDDD; list-style:none; float:left;"} }, _ul);
- var _linext = $$("div", { "innerHTML": "下一页", "href": "#", "style": { "cssText": "color:#5AA3CE;width:75px; height:25px; line-height:25px; text-align:center; border:1px solid #DDDDDD;float:left; list-style:none;"} }, _ul);
- var _hr = $$("div", { "style": { "cssText": "clear:both;"} }, _page);
- return _page;
- }
- //构建切换卡 --钟泽锋
- U.CD.C.Switchingcard = function () { //创建div用于包含切换卡
- var _sc = $$("div", { "style": { "cssText": "position:absolute;"} });
- var _ul = $$("div", { "style": { "cssText": "margin-left:0px;"} }, _sc);
- //var _f = $$("div", { "id": "first", "onclick": "switching(this)", "innerHTML": "第一部分", "style": { "cssText": "color:#5AA3CE; width:75px; height:25px; line-height:25px; text-align:center; border:1px solid #DDDDDD;list-style:none; float:left; margin:0px;"} }, _ul);
- //var _s = $$("div", { "id": "second", "onclick": "switching(this)", "innerHTML": "第二部分", "style": { "cssText": "color:#5AA3CE; width:75px; height:25px; line-height:25px; text-align:center; border:1px solid #DDDDDD;float:left; list-style:none;"} }, _ul);
- var _f = $$("div", { "id": "first", "innerHTML": "第一部分", "style": { "cssText": "color:#5AA3CE; width:75px; height:25px; line-height:25px; text-align:center; border:1px solid #DDDDDD;list-style:none; float:left; margin:0px;"} }, _ul);
- var _s = $$("div", { "id": "second", "innerHTML": "第二部分", "style": { "cssText": "color:#5AA3CE; width:75px; height:25px; line-height:25px; text-align:center; border:1px solid #DDDDDD;float:left; list-style:none;"} }, _ul);
- var _hr = $$("hr", { "style": { "cssText": "clear:both;"} }, _sc);
- var _div = $$("div", { "id": "show_div", "style": {} }, _sc);
- var _first = $$("div", { "id": "first_div", "style": { "cssText": "border:1px solid #DDDDDD;width:300px;height:100px;display:block;" }, "innerHTML": "<p>第一部分内容</p>" }, _div);
- var _second = $$("div", { "id": "second_div", "style": { "cssText": "border:1px solid #DDDDDD;width:300px;height:100px;display:none;" }, "innerHTML": "<p>第二部分内容</p>" }, _div);
- //js函数 大于号自动换行,导致切换功能不能使用,代码没有问题
- var _div = $$("div", { "style": {}, "innerHTML": "<script>function switching(obj){var divs = document.getElementById('show_div').childNodes; for(var iLoop = 0;divs.length>iLoop;iLoop++){divs[iLoop].style.display = 'none'; }document.getElementById(obj.id+'_div').style.display='block';}</script>" }, _sc);
- return _sc;
- }
- //构建搜索表单 --洪超彬
- U.CD.C.Search = function () {
- var _search = $$("div", { "style": { "cssText": "position:absolute;"} });
- $$("input", { "type": "text", "style": { "cssText": "width:150px; height:25px;float:left;border:1px solid #cccccc;"} }, _search);
- //$$("input", { "type": "button", "style": { "cssText": "height:25px;position:absolute;background-color:#e6e6e6;" }, "value": "搜索" }, _search);
- var _searchdiv = $$("div",{ "style": { "cssText": "width:50px; background-color:#e6e6e6; height:25px; padding-top:3px; float:left; margin-left:10px;border:1px solid #cccccc;"} }, _search);
- $$("div", { "href": "#", "style": { "cssText": "text-decoration:none; margin-left:11px; color:#333333;font-size:14px;cursor: pointer;" }, "innerHTML": "搜索" }, _searchdiv);
- //$$("input", { "type": "button", "value": "登录" }, _search);
- return _search;
- }
- //构建form登录表单 --洪超彬
- U.CD.C.Form = function () {
- var _form = $$("form", { "style": { "cssText": "position:absolute;"} });
- var _maildiv = $$("div", {}, _form);
- $$("div", { "style": { "cssText": "margin-top:15px;" }, "innerHTML": "电子邮箱:" }, _maildiv);
- $$("input", { "type": "text", "style": { "cssText": "width:300px;height:25px;margin-top:10px;border:1px solid #cccccc;"} }, _maildiv);
- var _pswdiv = $$("div", {}, _form);
- $$("div", { "style": { "cssText": "margin-top:15px;" }, "innerHTML": "密码:" }, _pswdiv);
- $$("input", { "type": "text", "style": { "cssText": "width:300px;height:25px;margin-top:10px;border:1px solid #cccccc;"} }, _pswdiv);
- var _logindiv = $$("div", { "style": { "cssText": "margin-top:15px;"} }, _form);
- $$("input", { "type": "checkbox", "style": { "cssText": "float:left;margin-top:-3px;"} }, _logindiv);
- $$("div", { "style": { "cssText": "width:100px; float:left;font-size:14px;" }, "innerHTML": "记住登录状态" }, _logindiv);
- var _butdiv = $$("div", { "style": { "cssText": "width:50px; background-color:#e6e6e6; height:25px; padding-top:3px; float:left; margin-left:10px;border:1px solid #cccccc;margin-top:-5px;"} }, _logindiv);
- $$("a", { "href": "#", "style": { "cssText": "text-decoration:none; margin-left:11px; color:#333333;font-size:14px;" }, "innerHTML": "登录" }, _butdiv);
- //$$("input", { "type": "button", "value": "登录" }, _logindiv);
- return _form;
- }
- //构建form注册表单 --洪超彬
- U.CD.C.Register = function () {
- var _register = $$("form", { "style": { "cssText": "position:absolute;"} });
- var _regdiv = $$("div", {}, _register);
- $$("div", { "style": { "cssText": "margin-top:15px;font-size:25px; color:Orange;" }, "innerHTML": "用户注册" }, _regdiv);
- var _regdiv1 = $$("div", { "style": { "cssText": "margin-top:30px;"} }, _regdiv);
- var _usediv = $$("div", { "style": { "cssText": "margin-top:35px;"} }, _regdiv1);
- $$("div", { "style": { "cssText": "margin-left:15px;float:left;" }, "innerHTML": "用户名:" }, _usediv);
- $$("input", { "type": "text" }, _usediv);
- var _pswdiv = $$("div", { "style": { "cssText": "margin-top:35px;"} }, _regdiv1);
- $$("div", { "style": { "cssText": "margin-left:30px;float:left;" }, "innerHTML": "密码:" }, _pswdiv);
- $$("input", { "type": "text" }, _pswdiv);
- var _paswdiv = $$("div", { "style": { "cssText": "margin-top:35px;"} }, _regdiv1);
- $$("div", { "style": { "cssText": "float:left;" }, "innerHTML": "确认密码:" }, _paswdiv);
- $$("input", { "type": "text" }, _paswdiv);
- var _namediv = $$("div", { "style": { "cssText": "margin-top:35px;"} }, _regdiv1);
- $$("div", { "style": { "cssText": "float:left;" }, "innerHTML": "用户全称:" }, _namediv);
- $$("input", { "type": "text" }, _namediv);
- var _teldiv = $$("div", { "style": { "cssText": "margin-top:35px;"} }, _regdiv1);
- $$("div", { "style": { "cssText": "float:left;margin-left:30px;" }, "innerHTML": "电话:" }, _teldiv);
- $$("input", { "type": "text" }, _teldiv);
- var _adrdiv = $$("div", { "style": { "cssText": "margin-top:35px;"} }, _regdiv1);
- $$("div", { "style": { "cssText": "float:left;margin-left:30px;" }, "innerHTML": "地址:" }, _adrdiv);
- $$("input", { "type": "text" }, _adrdiv);
- var _maildiv = $$("div", { "style": { "cssText": "margin-top:35px;"} }, _regdiv1);
- $$("div", { "style": { "cssText": "float:left;margin-left:30px;" }, "innerHTML": "邮箱:" }, _maildiv);
- $$("input", { "type": "text" }, _maildiv);
- var _qqdiv = $$("div", { "style": { "cssText": "margin-top:35px;"} }, _regdiv1);
- $$("div", { "style": { "cssText": "float:left;margin-left:35px;" }, "innerHTML": "QQ:" }, _qqdiv);
- $$("input", { "type": "text" }, _qqdiv);
- var _butdiv = $$("div", { "style": { "cssText": "margin-top:50px; margin-left:100px;"} }, _regdiv1);
- $$("input", { "type": "button", "value": "确定" }, _butdiv);
- $$("input", { "type": "reset" }, _butdiv);
- return _register;
- }
- //构建遮罩窗体 --洪超彬
- U.CD.C.ShadeForms = function () {
- return $$("input", { "type": "button", "style": { "cssText": "width:120px; height:25px; position:absolute;" }, "value": "按钮", "onclick": U.CD.C.Shade() });
- }
- //触发遮罩窗体的函数 --洪超彬
- U.CD.C.Shade = function () {
- var coverDiv = $$("div", { "style": { "cssText": "position:absolute;background:#000000;left:0px;top:0px;z-Index:0;"} });
- document.body.appendChild(coverDiv);
- var _div = $$("div", { "style": { "cssText": "position:absolute;background:white;left:35%;top:10%;width:500px; height:200px;z-Index:1;"} }, coverDiv);
- var _Buttondiv = $$("div", { "style": { "cssText": "width:50px; background-color:#0044cc; height:25px; padding-top:6px; margin-top:150px;margin-left:420px;float:left;"} }, _div);
- $$("a", { "href": "#", "style": { "cssText": "color:white; text-decoration:none; margin-left:12px;" }, "innerHTML": "关闭" }, _Buttondiv);
- var _Buttondiv1 = $$("div", { "style": { "cssText": "width:80px; background-color:#e6e6e6; height:25px; float:left;padding-top:6px; margin-left:320px;float:left;margin-top:-30px;"} }, _div);
- $$("a", { "href": "#", "style": { "cssText": "text-decoration:none; margin-left:12px; color:black;" }, "innerHTML": "保存设置" }, _Buttondiv1);
- var bodySize = []; //定义一个数组用于存放页面宽度高度
- with (document.documentElement) {
- bodySize[0] = (scrollWidth > clientWidth) ? scrollWidth : clientWidth; //如果滚动条的宽度大于页面的宽度,取得滚动条的宽度,否则取页面宽度
- bodySize[1] = (scrollHeight > clientHeight) ? scrollHeight : clientHeight; //如果滚动条的高度大于页面的高度,取得滚动条的高度,否则取高度
- }
- coverDiv.style.width = bodySize[0] + 'px'
- coverDiv.style.height = bodySize[1] + 'px';
- (document.all && window.ActiveXObject && !window.opera) ? coverDiv.style.filter = "Alpha(Opacity=60)" : coverDiv.style.opacity = 0.6; //判断浏览器,根据浏览器调整透明度
- }
- //构建按钮组 --洪超彬
- U.CD.C.ButtonGrop = function () {
- var _ButtonGrop = $$("div", { "style": { "cssText": "width:128px; height:35px; border:1px solid #cccccc; position:absolute;"} });
- var _button1 = $$("div", { "style": { "cssText": "width:30px; height:30px; float:left;border:1px solid #cccccc;padding-top:5px;"} }, _ButtonGrop);
- $$("a", { "href": "#", "style": { "cssText": "text-decoration:none; padding-left:8px;color:#000000;font-size:14px;" }, "innerHTML": "亖" }, _button1);
- var _button2 = $$("div", { "style": { "cssText": "width:30px; height:30px; float:left;border:1px solid #cccccc;padding-top:5px;"} }, _ButtonGrop);
- $$("a", { "href": "#", "style": { "cssText": "text-decoration:none; padding-left:8px;color:#000000;font-size:14px;" }, "innerHTML": "亖" }, _button2);
- var _button3 = $$("div", { "style": { "cssText": "width:30px; height:30px; float:left;border:1px solid #cccccc;padding-top:5px;"} }, _ButtonGrop);
- $$("a", { "href": "#", "style": { "cssText": "text-decoration:none; padding-left:8px;color:#000000;font-size:14px;" }, "innerHTML": "亖" }, _button3);
- var _button4 = $$("div", { "style": { "cssText": "width:30px; height:30px; float:left;border:1px solid #cccccc;padding-top:5px;"} }, _ButtonGrop);
- $$("a", { "href": "#", "style": { "cssText": "text-decoration:none; padding-left:8px;color:#000000;font-size:14px;" }, "innerHTML": "亖" }, _button4);
- return _ButtonGrop;
- }
- //构建进度条 --洪超彬
- U.CD.C.Bar = function () {
- var _ButtonGrop = $$("div", { "style": { "cssText": "width:300px; height:20px; position:absolute; background-Color:#CCCCCC;"} });
- var _button1 = $$("div", { "style": { "cssText": "width:160px; height:20px;background-Color:#0D8FD1;"} }, _ButtonGrop);
- return _ButtonGrop;
- }
- //构建预览列表 --洪超彬
- U.CD.C.Preview = function () {
- var _PreviewBorderdiv = $$("div", { "style": { "cssText": "position:absolute;"} });
- var _Preview = $$("div", { "style": { "cssText": "float:left; width:30%; margin-left:2%; border:1px solid #CCCCCC;"} }, _PreviewBorderdiv);
- $$("img", { "style": { "cssText": "width:99%; margin:2%;" }, "src": "images/city.jpg" }, _Preview);
- var _PreviewContent = $$("div", { "style": { "cssText": "margin-left:10px; width:90%;"} }, _Preview);
- $$("h3", { "innerHTML": "冯诺尔曼结构" }, _PreviewContent);
- $$("p", { "innerHTML": "也称普林斯顿结构,是一种将程序指令存储器和数据存储器合并在一起的存储器结构。程序指令存储地址和数据存储地址指向同一个存储器的不同物理位置。" }, _PreviewContent);
- var _PreviewButton = $$("div", { "style": { "cssText": "height:50px;"} }, _PreviewContent);
- var _PreviewButtondiv = $$("div", { "style": { "cssText": "width:50px; background-color:#0044cc; height:30px; padding-top:6px; float:left;"} }, _PreviewButton);
- $$("a", { "href": "#", "style": { "cssText": "color:white; text-decoration:none; margin-left:9px;" }, "innerHTML": "浏览" }, _PreviewButtondiv);
- var _PreviewButtondiv1 = $$("div", { "style": { "cssText": "width:50px; background-color:#e6e6e6; height:30px; padding-top:6px; float:left; margin-left:10px;"} }, _PreviewButton);
- $$("a", { "href": "#", "style": { "cssText": "text-decoration:none; margin-left:9px; color:black;" }, "innerHTML": "分享" }, _PreviewButtondiv1);
- var _Preview1 = $$("div", { "style": { "cssText": "float:left; width:30%; margin-left:2%; border:1px solid #CCCCCC;"} }, _PreviewBorderdiv);
- $$("img", { "style": { "cssText": "width:99%; margin:2%;" }, "src": "images/city.jpg" }, _Preview1);
- var _PreviewContent1 = $$("div", { "style": { "cssText": "margin-left:10px; width:90%;"} }, _Preview1);
- $$("h3", { "innerHTML": "冯诺尔曼结构" }, _PreviewContent1);
- $$("p", { "innerHTML": "也称普林斯顿结构,是一种将程序指令存储器和数据存储器合并在一起的存储器结构。程序指令存储地址和数据存储地址指向同一个存储器的不同物理位置。" }, _PreviewContent1);
- var _PreviewButton1 = $$("div", { "style": { "cssText": "height:50px;"} }, _PreviewContent1);
- var _PreviewButtondiv2 = $$("div", { "style": { "cssText": "width:50px; background-color:#0044cc; height:30px; padding-top:6px; float:left;"} }, _PreviewButton1);
- $$("a", { "href": "#", "style": { "cssText": "color:white; text-decoration:none; margin-left:9px;" }, "innerHTML": "浏览" }, _PreviewButtondiv2);
- var _PreviewButtondiv3 = $$("div", { "style": { "cssText": "width:50px; background-color:#e6e6e6; height:30px; padding-top:6px; float:left; margin-left:10px;"} }, _PreviewButton1);
- $$("a", { "href": "#", "style": { "cssText": "text-decoration:none; margin-left:9px; color:black;" }, "innerHTML": "分享" }, _PreviewButtondiv3);
- var _Preview2 = $$("div", { "style": { "cssText": "float:left; width:30%; margin-left:2%; border:1px solid #CCCCCC;"} }, _PreviewBorderdiv);
- $$("img", { "style": { "cssText": "width:99%; margin:2%;" }, "src": "images/city.jpg" }, _Preview2);
- var _PreviewContent2 = $$("div", { "style": { "cssText": "margin-left:10px; width:90%;"} }, _Preview2);
- $$("h3", { "innerHTML": "冯诺尔曼结构" }, _PreviewContent2);
- $$("p", { "innerHTML": "也称普林斯顿结构,是一种将程序指令存储器和数据存储器合并在一起的存储器结构。程序指令存储地址和数据存储地址指向同一个存储器的不同物理位置。" }, _PreviewContent2);
- var _PreviewButton2 = $$("div", { "style": { "cssText": "height:50px;"} }, _PreviewContent2);
- var _PreviewButtondiv4 = $$("div", { "style": { "cssText": "width:50px; background-color:#0044cc; height:30px; padding-top:6px; float:left;"} }, _PreviewButton2);
- $$("a", { "href": "#", "style": { "cssText": "color:white; text-decoration:none; margin-left:9px;" }, "innerHTML": "浏览" }, _PreviewButtondiv4);
- var _PreviewButtondiv5 = $$("div", { "style": { "cssText": "width:50px; background-color:#e6e6e6; height:30px; padding-top:6px; float:left; margin-left:10px;"} }, _PreviewButton2);
- $$("a", { "href": "#", "style": { "cssText": "text-decoration:none; margin-left:9px; color:black;" }, "innerHTML": "分享" }, _PreviewButtondiv5);
- return _PreviewBorderdiv;
- }
- //论坛系统 蒲昊
- U.CD.C.forum = function () {
- var button = $$('a', {innerHTML:'打开论坛'})
- button.setAttribute('onclick', "U.MD.D.I.openApplication('PB', '3c779543-bc1a-4851-af22-af9ba97a5f33')")
- return button
- }
|