0
回答
ControlJS 使用时firebug提示一个框架文档的字符编码未声明。该文档可能与非框架时的显示效果不同。
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

实现显示的效果也是不一样的,页面中有使用jquery easyui

代码:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.huating.jfp.system.model.*,javax.servlet.http.Cookie"%>
<%@page import="java.text.SimpleDateFormat"%>
<%
    String path = request.getContextPath();
    //String path = request.getRequestURI();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%
    session.setMaxInactiveInterval(4*60*60);
    Object on = session.getAttribute("name");
    Object ou = session.getAttribute("url");
   
    String name = "";
    String url = "";
    if (on != null && ou != null) {
        name = (String) on;
        url = (String) ou;
    }
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <base href="<%=basePath%>">
        <link href="<%=basePath%>jfp/framework/css/global.css"
            rel="stylesheet" type="text/css" />
        <link href="<%=basePath%>jfp/framework/css/style1.css"
            rel="stylesheet" type="text/css" />
        <jsp:include page="../common/head.jsp"></jsp:include><!-- 导入各种js -->
        <script type="text/cjs" data-cjssrc="<%=basePath%>jfp/js/outlook.js" charset="utf-8"></script>
        <script type="text/cjs" data-cjssrc="<%=basePath%>js/jgxLoader.js" charset="utf-8"></script>
        <!-- 需要放最后 -->
        <script type="text/cjs" charset="utf-8">
        var desktopId;
    $(function(){
            setInterval("updateDate();",1000);
            bindEvent();
            $('a[name=ad]').bind('contextmenu',function(e){
                    e.preventDefault();
                    $('#m2').menu('show',{ 
                            left: e.pageX,
                            top: e.pageY
                        });
                        desktopId=$(this).attr('id')
            });
            //初始化树
            var tree2=$('#tt2').tree({
                onClick:function(node){
                    if(node.attributes!=null){
                        if(node.attributes.url){
                            var url='<%=basePath%>jfp/'+node.attributes.url;
                            $.post('login!saveFunctionCode.action',{'functionCode':node.id},function(date){
                               
                            },'json')
                            addTab(node.text,url);
                        }
                        if(tree2.tree('isLeaf',node.target)){
                       
                        }else{
                            if(node.state=='closed'){
                                tree2.tree('expand',node.target);
                            }else{
                                tree2.tree('collapse',node.target);
                            }
                           
                        }
                   
                    }
                },
                onContextMenu:function(e,node){
                     e.preventDefault();//阻止鼠标默认事件
                     if($('#tt2').tree('isLeaf',node.target)){
                     $('#tt2').tree('select',node.target);
                     $('#mm').menu('show',{ 
                            left: e.pageX,
                            top: e.pageY
                        });
                     }
                    
                },
              onLoadSuccess:function(node,data){
                     $.messager.show({
                                title:'成功',
                                msg:'菜单初始化成功',
                                timeout:1000,
                                showType:'slide'
                            });
                    } 
            });
            var tabs=$('#tabs').tabs({
            });
            var name='<%=name%>';
            if(!name){
               
            }else{
                var url='<%=basePath%>jfp/<%=url%>';
                addTab('<%=name%>',url);
            }
        });
       
       
        function closeWin(){
            $('#form1').form('clear');
            $('#win').window({ 
                        closed:true 
                    });
        };
        function updatePas(){
                addTab('修改密码','<%=basePath%>jfp/system/pas.jsp');
        };
       
        //绑定菜单click事件
        function bindEvent(){
            $('#add').bind('click',function(){
                var node =$('#tt2').tree('getSelected');
                    $.post('fastkey!insert.action',{'fastkey.accountId':$('#accountId').val(),'fastkey.name':node.text,'fastkey.url':node.attributes.url,'fastkey.functionCode':node.id},function(data){
                        $.messager.alert('成功',data.message);
                    },'json');
            });
           
            $('#mr').bind('click',function(){
                    $.post('login!setDesktor.action',{'userDesktop.desktopId':desktopId},function(data){
                            msgShow('信息',data.message,'info');
                    },'json');
            });
        };
       
        //功能配置
        function gndh(){
            //$('#il').layout('expand','west'); 
            $('td[name=target]').empty();
            $(".tabs-inner span").each(function (i, n) {
                var t = $(n).text();
                $("#tabs").tabs("close", t);
            });
        }
        //桌面菜单
        function createDesk(deskId){
                parent.location.href = '<%=basePath%>login!jumpDesktop.action?deskId='+deskId;
        }
       
        function updateDate()
        {
           $("#messgage").html('现在时间是:'+(new Date()).toLocaleString());
         }
    </script>
    </head>
  
    </body>
</html>
举报
shouzhoujie
发帖于5年前 0回/5K+阅
顶部