源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

jsp中一个页面引入另一个页面的实现代码

  • 时间:2022-04-11 20:17 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:jsp中一个页面引入另一个页面的实现代码
action代码片段
[url=styles/css.css]<script src="scripts/DatePicker/WdatePicker.js"></script> <script src="scripts/Globals.js"></script> <script src="scripts/DhtmlTree/js/dhtmlxcommon.js"></script> <script src="scripts/DhtmlTree/js/dhtmlxtree.js"></script> <link type="text/css" rel="stylesheet"     href="scripts/DhtmlTree/css/dhtmlxtree.css"> </head> <body>     <web:clean editorMeta="editor" />     <s:hidden name="epVO.deptid" id="deptid" />     <web:error />     <div id="query" class="framesytle">        <!-- 是否在了那个一个页面中打开 -->         <s:if test="#attr.flag=='open'">             <web:queryTable action="listEp.action?flag=open" editorMeta="editor"                 title="查询条件" />             <web:tableList action="listEp.action?method=list&flag=open"                 headerMeta="header" hiddenMeta="hidden" title="查询结果"                 showlist="hidden" top="false" mode="radio" />         </s:if>         <s:else>             <web:queryTable action="listEp.action" editorMeta="editor"                 title="查询条件" />             <web:tableList action="listEp.action?method=list" headerMeta="header"                 hiddenMeta="hidden" title="查询结果" showlist="hidden" top="false"                 mode="radio" />         </s:else>     </div> </body> </html> <script language="JavaScript" type="text/JavaScript">        //部门查询时用到的     $("#queryBtn").removeAttr('onclick').click(             function() {                 var obj = document.forms['queryForm'];                 obj.action = '<s:url value="/listEp.action"/>'                         + '?deptid=' + document.getElementById('deptid').value;                 obj.submit();             });     //打开时页面要传递的值     jQuery(function() {         var flag = '<s:property value="#attr.flag" />';         if (flag == "open") {             $("#dataTable tr").removeAttr("title").removeAttr("ondblclick");             jQuery(".all_border .hs tbody tr").attr("title", "双击选中");             jQuery(".all_border .hs tbody tr:gt(0)").removeAttr('ondblclick')                     .dblclick(                             function() {                                 //隐藏域中取的值 list()中取                                 var name = $(this).find("input[name='name']")                                         .val();                                 //var deptname = $(this).find("input[name='deptname']").val();                                 var deptid = $(this).find(                                         "input[name='deptid']").val();                                 //平常的值                                 var deptname = $(this).children().eq(2).text()                                 var info = $(this).children().eq(10).text()                                         .split(";")[0];                                 if (info == "") {                                     info = "暂无路线";                                 }                                 var arr = new Array();                                 arr[0] = name;                                 arr[1] = deptname;                                 arr[2] = deptid;                                 arr[3] = info;                                 returnValue = arr;                                 window.close();                             });         }     });     $(document)             .ready(                     function() {                         var deptname = document.getElementById('deptname').value;                         var deptid = document.getElementById('deptid').value;                         var plateno = document.getElementById('plateno').value;                         $("#queryTable")                         .html("<tbody><tr class='f1f1f1'><td align='right'>公司:</td><td class='r_border'><input type='text' value='"+deptname+"' id='deptname' name='deptname' class='input_sytle_1'></td><td align='right'>车牌号:</td><td class='r_border'><input type='text' value='"+plateno+"' id='plateno' name='plateno' class='input_sytle_1'><input type='hidden' value='"+deptid+"' id='deptid' name='deptid' class='input_sytle_1'></td></tr></tbody>");                 var tree = initDropDownTree('orgTree',                         '<s:url value="/commonPage.action?method=getOrgTree"/>');                 setTextBoxTree('deptname', 'deptid', 'orgTree', tree);                     }); </script>
jsp被引用js代码片段
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部