• 常用jqueryui控件代码


    var OneIsFresh = false;
    var TwoIsFresh = false;
    var ThreeIsFresh = false;
    $(function () { 
    $("#tab").tabs({
    show: function (event, ui) {
    g_Cur_Tab = ui.index;
    tabActive();
    }
    });
    });

    function tabActive() {
    switch (g_Cur_Tab) {
    case 0:
    $('#tabsArea').tabs({ selected: 0 });
    if (OneIsFresh == false) {
    OneIsFresh = true;//切换回来之后不需要重新刷新
    loadPurviewSysManTable();
    }
    break;
    case 1:
    $('#tabsArea').tabs({ selected: 1 });
    if (TwoIsFresh == false) {
    TwoIsFresh = true;
    loadPurviewPduMgrManTable();
    }
    break;
    case 2:
    $('#tabsArea').tabs({ selected: 2 });
    if (ThreeIsFresh == false) {
    ThreeIsFresh = true;
    loadPurviewMgrManTable();
    }
    break;
    default:
    $('#tabsArea').tabs({ selected: 0 });
    if (OneIsFresh == false) {
    OneIsFresh = true;
    loadPurviewSysManTable();
    }
    break;
    }
    }





    $("#validateForm-c").validate({ 
    errorClass: "error", 
    ignoreTitle: true, 
    submitHandler: function (form) { 
    submit3(); 
    }, 
    rules: {}, 
    messages: {} 
    }); 




    $("#divPduTree").dialog( 

    show: "slow", 
    bgiframe: false, 
    autoOpen: true, 
    300, 
    height: 600, 
    draggable: true, 
    resizable: false, 
    modal: true, 

    buttons: { 
    "取消": function () { 
    $(this).dialog("close"); 
    }, 
    "确定": function () { 
    $(this).dialog("close"); 


    });

    $("#divTip").dialog({ 
    show: false, 
    bgiframe: false, 
    autoOpen: false 
    }); 


    $("#txtdirname").click(function (event) { 

    initPurviewTree(); 

    var top = $(event.target).offset().top + 22; 
    var left = $(event.target).offset().left; 
    $("#divTip").dialog("option", "position", [left, top]); 
    $("#divTip").dialog("open"); 
    });

    tab控件的使用:

    var OneIsFresh = false; 
    var TwoIsFresh = false; 
    var ThreeIsFresh = false; 
    $(function () { 
    $("#tab").tabs({ 
    show: function (event, ui) { 
    g_Cur_Tab = ui.index; 
    tabActive(); 

    }); 
    }); 

    function tabActive() { 
    switch (g_Cur_Tab) { 
    case 0: 
    $('#tabsArea').tabs({ selected: 0 }); 
    if (OneIsFresh == false) { 
    OneIsFresh = true;//切换回来之后不需要重新刷新 
    loadPurviewSysManTable(); 

    break; 
    case 1: 
    $('#tabsArea').tabs({ selected: 1 }); 
    if (TwoIsFresh == false) { 
    TwoIsFresh = true; 
    loadPurviewPduMgrManTable(); 

    break; 
    case 2: 
    $('#tabsArea').tabs({ selected: 2 }); 
    if (ThreeIsFresh == false) { 
    ThreeIsFresh = true; 
    loadPurviewMgrManTable(); 

    break; 
    default: 
    $('#tabsArea').tabs({ selected: 0 }); 
    if (OneIsFresh == false) { 
    OneIsFresh = true; 
    loadPurviewSysManTable(); 

    break; 

    }

  • 相关阅读:
    锚点的用法
    通配符的匹配很全面, 但无法找到元素 'context:component-scan' 的声明
    transient简介
    background-position和position
    推荐比较好的前端博客
    margin和 padding 以及 float :left和float :right的介绍
    poi解析excel(含有公式)
    spring aop做什么介绍
    Java再学习——Executor,ExecutorService,ScheduledExecutorService与Executors
    Java再学习——CopyOnWrite容器
  • 原文地址:https://www.cnblogs.com/cw_volcano/p/2084298.html
Copyright © 2020-2023  润新知