ftl找不到JS路径,试了几种方法都不对_html/css_WEB-ITnose

php中文网
发布: 2016-06-21 08:50:21
原创
2205人浏览过

<%string path = request.getcontextpath();%><!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">	<html>	  <head>          <title>login.html</title>	    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">	    <meta http-equiv="description" content="this is my page">	    <meta http-equiv="content-type" content="text/html; charset=utf-8">	    <script type="text/javascript" src="${path}/emos/activemanage/js/calendar3.js"></script>	    <link href="${path}/common/activecss/stylee.css" rel="stylesheet" type="text/css" />	    <script type="text/javascript">   	   function date(){	    var mydate = new date();	    mydate.tolocaledatestring();	    var result=mydate.getfullyear()+'-'+(mydate.getmonth()+1)+'-'+mydate.getdate();	    return result;	    }	    window.onload=function(){		document.getelementbyid("datestart").value=date();		document.getelementbyid("datecreate").value=date();		document.getelementbyid("dateend").value=date();		document.getelementbyid("datelast").value=date();	}	    var areaarrayfa = function(obj){	    var regnum=/^[0-9]*$/;	    var ipt=obj.split(",");	    var numstring="";	    var charstring="";	for(var i=0;i<ipt.length;i++){ 	    if(regnum.test(ipt[i])){		if(numstring==""){		  numstring=ipt[i];		}else{		   numstring+=","+ipt[i];		}    	    }	    else{  		if(charstring==""){		   charstring=ipt[i];		}else{		    charstring+=","+ipt[i];		}		} 		  }		 document.getelementbyid("action").value=numstring;		 document.getelementbyid("activearea").value=charstring;	}   	    function select() {  	      window.open ('"/common/ftl/area.ftl', 'newwindow', 'height=300, width=500, top=100,left=950, toolbar=no,menubar=no, scrollbars=no, resizable=no,location=no, status=no');	     }	 	function addactive(){ 	 	 		var form = document.forms[0];			form.action = "/emos-dms/active/addactive.htm";			form.method="post";			form.submit();  		}  		function seractive() {			window.open( '/emos-dms/active/list.do', 'newwindow', 'height=500, width=500, top=100,left=950, toolbar=no,menubar=no, scrollbars=no, resizable=no,location=no, status=no');		}		var activearrayfa = function(serc) { 			document.getelementbyid("serchid").value = serc;		} 	</script> 	 	  </head>	  <body>	 	<div class="register span6"  id="head">		<!--   <form action="/emoss/active/addactive.do" name="activeform" method="post">  	 -->	  <form action="active_*" name="activeindex*" method="post">	 <h2>活动信息 </h2> 	<table id="guimo" align="center">	<tr>	 <td><input type="hidden" name="area1" id="action"><td>	</tr>	<tr>	<td>活动编码: </td>   <td><input type="text" name="activecode" id="activecode">    </td>	<td>活动名称:</td>	<td><input type="text" name="activename"></td>	</tr>	<tr>	<td>活动说明:</td>	<td><input type="text" name="activedesc"></td>	<td>移动编码:</td>	<td><input type="text" name="serviceid" ></td>	</tr>	<tr> 	<td>活动时长:</td>	 <td><input type="text" name="activeperiod"   placeholder="单位: 月"></td>	<td>开始时间:</td>	<td><input type="text" name="activestartdate" id="datestart"  		onclick="new calendar().show(this);"  class="text-order"></td>	</tr>	<tr>	<td>结束时间:</td>	<td><input type="text" name="activeenddate" id="dateend"  		onclick="new calendar().show(this);"   class="text-order"></td>	<td>活动类型:</td>	<td><select name="activetype" onchange="look()" id="typt" style="width:100%;height:30px">			<#list activetypedto as ac>			<option value="${ac.paramname}"> ${ac.paramvalue}</option>			 </#list>		</select>	</td>	</tr>	<tr>	<td>活动状态:</td>	<td><input type="text" name="activestatus" value="正常"></td>	<td>父活动编码:</td>	<td><input type="text" name="paractiveid"  id="serchid" onclick="seractive()"></td>		</tr>	<tr>	<td>创建时间:</td>	<td><input type="text" name="createddate" id="datecreate"  		onclick="new calendar().show(this);" class="text-order"></td>	<td>创建人:</td>	<td><input type="text" name="createdby"></td>	</tr>	<tr>	<td>最后修改时间:</td>	    <td><input type="text" name="lastupdateddate"  id="datelast"		onclick="new calendar().show(this);"  class="text-order"></td>   	<td>最后修改人:</td>	<td><input type="text" name="lastupdatedby"></td>	</tr> 	 </table>	   <div id="area">	 活动地区: 	 <button type="button" onclick="select()">查询</button> 	<!--  <input type="button" name="submit" value="查询" onclick="select();"> --><br />	 <div id="area_text">	     <textarea id="activearea" name = "activearea" rows="5" cols="50" ></textarea> </div>	 </div><br/>	 <center>	<input type="reset" name="reset" value="重置"/>	        	<input type="submit" name="submit" value="提交" onclick="addactive();"/>	</center> 	</form>	</div>	</body>	</html>
登录后复制

白瓜面试
白瓜面试

白瓜面试 - AI面试助手,辅助笔试面试神器

白瓜面试 40
查看详情 白瓜面试


回复讨论(解决方案)

1: 用 ${pageContext.request.contextPath} 指向项目的根目录

2: 配置参数+html base

在web.xml中
  
    domain
    域名或ip
  


在html中
nbsp;html>




...


js,css都用相对路径,例:

这时core.css 指南 domain+"/style/core.css"
HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号