온라인 답변에 따르면 Easy-UI는 하위 버전에서 클래스 스타일을 삭제하고 JavaScript로 URL을 작성해야하기 때문입니다. 클래스에 URL이 있으면 JavaScript에는 URL도 두 번 새로 고쳐 지지만 테스트 후에는 문제가 해결되지 않았습니다. 나중에, 나는 반복 된 테스트를 통해 마침내 문제를 발견했습니다.
<ul id = "eva"style = "font-size : 25px;"> </ul>
페이지에 스타일을 썼기 때문에 스타일의 스타일을 삭제하면 문제가 해결 될 수 있습니다. 이제 완전한 Ajax 동적 트리 및 그리드 테이블 코드를 첨부합니다.
<html> <head> <title> tree </title> <link href = "../../ content/jqeasyui/테마/default/easyui.css"rel = "stylesheet"type = "text/css"/> <link href = "../ 컨텐츠/jQeasyUi/Tremes/icon.css"stylesheet "". src = "../../ 스크립트/jquery-1.4.4.min.js"type = "text/javaScript"> </script> <script src = "../../ scripts/jquery.unbtrusive-ajax.js"type = "text/javascript"> </script src = "../../ 스크립트/jquery.easyui.min.js"type = "text/javaScript"> </script> <script src = "../../ scripts/easyui-lang-zh_cn.js"type = "text/javaScript"</script> <text/javascript; var 시간; var treeeva; $ (function () {inittable (); $ ( "#selectform"). css ( "display", "none"); bindsearcheclick (); $ ( '#eva'). tree ({url : '/oee/gettree', 메소드 : 'get', animate : true, checkbox : true}); // 테이블 함수 초기화 initTable () {$ ( '#tt'). Datagrid ({url : '/oee/details', 제목 : 'oee', width : 700, height : 360, fitcolumns : true, idfield : 'fid', '장치에 대한 정보가로드됩니다 ...', Pageize : 10, pageRelize : 10, pageRiler : 10, pageLize : 10, pageLize : ' [10, 20, 30], QueryParams : {// noderesult : nodetext, selecttime : $ ( '#selecttime'). datebox ( 'getValue')}, 열 : [// {eid, etypename, thentypeinfotid, etypenum} {field : ', wid', ',', wid ',', wid ', wid', wid ', wid'{inter ' }, {field : 'name', 제목 : 'deltimeoee', title : 'name', width : 80, align : "center"}, {field : 'earlytimeoee', 'earlytimeoee', 'earlytimeoee', width : 80, 'center},'middletimeoee ','noon oee ', width : 80, allign : allign : allign : allign : allign : allign : align :'width : 'elign}, {field :'noon oee ' '후기 타임 오이', 제목 : 'Night Timeoee', 너비 : 80, 정렬 : "Center"}, {필드 : 'delflag', 제목 : '조작', 너비 : 80, '센터', formatter : 함수 (value, row, index) {var str = "<a fid = '' + row.fid +" 'class ='selectInfo ' href = 'javaScript : void (0)'> 세부 사항 </a> "; Return str; }}]], 내장 인자 텍스트 메뉴 : 함수 (e, field) {}, onloadSuccess : function (data) {$ ( ". selectInfo"). unbind ( "click"); $ ( ". selectInfo"). bind ( "click", function () {doSelect ($ (this) .attr ( "fid"), time); return false;}); }}); } 함수 doSelect (fid, time) {var reg = new regexp ( "-", "g"); var strobj = fid.tostring (); var newsstr = strobj.replace (reg, "$"); $ ( '#selectframe'). attr ( 'src', '/oee/getSelectInfo/' + fid + '/' + time); $ ( '#selectform'). css ( 'display', 'block'); $ ( '#selectform'). 대화 상자 ({너비 : 470, 높이 : 470, modal : true, true : "show show", collapse : true, minimal : true, maximizable : true, true, buttons : [id : 'btnselect', 'ok', iconcls : 'icon-add', handler : function (in icon-add '). $ ( "#selectform"). 대화 상자 ( "close"); } // 검색 쿼리 함수의 클릭 이벤트 바인드 바인드 researcheClick () {// linkbuttonsearch $ ( "#linkbuttonsearch"). 클릭 (function () {var nodes = $ ( '#eva'). tree ( 'getChecked'); var s = '; for (for i = 0; i <++) {s (s!),' ''; += 노드 [i]. . id = "selecttime"/> <a id = "ind href"href = "javaScript : void (0)"data-options = "iconcls : 'icon-search'"> query </a> </div> <table id = "tt"iconcls = "icon-edit"> src = "javaScript : void (0)"프레임 보더 = "0"> </iframe> </div> </div> </div> </div> </body> </html>