123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- Namespace.register("U.Control.alert"); //登录页面的命名空间
- /*
- 夏龙桥
- 付超
- */
- /*window.onload = function () {
- U.Control.alert.clearlove();
- //$("body").append(U.Control.alert.carrier());
- }*/
- U.Control.alert.clearlove = function () {
- return U.Control.alert.carrier();
- }
- U.Control.alert.carrier = function () {
- //var U_C_box = $$("div", { "className": "box" }, $("#UCD_CT_SM_IF")[0]);
- var U_C_box = $('<div class="box"></div>')[0];
- //点击弹出需要手动关闭的弹窗
- var U_C_button = $$("button", { "id": "button", "innerHTML": "alert" }, U_C_box);
- //点击弹出自动关闭的弹窗
- var U_C_button1 = $$("button", { "id": "button1", "innerHTML": "alert" }, U_C_box);
- //弹出需要手动关闭的弹窗
- var U_C_carrier = $$("div", { "id": "carriers" }, U_C_box);
- //弹出需要自动关闭的弹窗
- var U_C_Tsdiv = $$("div", { "id": "Tsdiv" }, U_C_box);
- //关闭弹窗按钮
- var U_C_close = $$("div", { "id": "close" }, U_C_carrier);
- var U_C_warning = $$("div", { "id": "warning" }, U_C_carrier);
- //弹窗标题
- var U_C_title = $$("p", { "id": "title", "innerHTML": "这里是标题呀标题" }, U_C_carrier);
- //弹窗内容
- var U_C_conte = $$("p", { "id": "conte", "innerHTML": "在页面上弹出友善的提示框,不会自动消失,需自己点击按钮关闭." }, U_C_carrier);
- var U_C_confirm = $$("div", { "id": "confirm", "innerHTML": "确认" }, U_C_carrier);
- U_C_button.onclick = function () {
- U_C_carrier.style.cssText = "display:block";
- }
- U_C_close.onclick = function () {
- U_C_carrier.style.cssText = "display:none";
- }
- U_C_confirm.onclick = function () {
- U_C_carrier.style.cssText = "display:none";
- }
- U_C_button1.onclick = function () {
- //到时间后消失
- U_C_Tsdiv.innerHTML = "文字所在区域,弹出1~2秒内消失";
- U_C_Tsdiv.style.cssText = "display:block";
- setTimeout("U.Control.alert.dispaly()", 500);
- }
- U.Control.alert.dispaly = function () {
- U_C_Tsdiv.style.cssText = "display:none";
- }
- return U_C_box;
- //$("body").append(U.Control.alert.carrier());
- U.Control.alert.cue();
- U.Control.alert.disappear();
- }
- //一个弹窗 手动关闭的弹窗 返回button
|