我无法找到问题所在,它与js文件或server.It对某些页面没问题,但它没有在firefox中加载js文件。 用firefox:
SyntaxError: illegal character
癡爠浥湵楤猠㵛≶敲瑩捡汭敮產崻 ⽅湴敲搨猩映啌敮畳Ⱐ獥灡牡瑥搠批潭浡猍੶慲畢浥湵潦晳整‽㈠⼯佦晳整映獵扭敮畳牯洠浡楮
cssver...menu.js (line 1, col 7)
SyntaxError: illegal character
⼯䉥汯眠晵湣瑩潮猠畳敤⁴漠晩汬⁴桥⁓異灬楥牓畢⁃慴敧潲礠乡浥猠摲潰摯睮⸊晵湣瑩潮敬散瑟潮䍨慮来⡭慩湓異灎慭攩笊†ਠ†
Mariti...tory.js (line 1)
SyntaxError: illegal character
晵湣瑩潮汯獥浥⠩ഊ笍ਉउ∣汢潸∩慤敏畴⠢獬潷∩㬍ਉउ∣执∩慤敏畴⠢獬潷∩㬍ਉउ∮汩獴扯硤慴慢慮欢⤮捳猨≶楳楢楬楴礢Ⱒ
popup.js (line 1, col 4)
SyntaxError: illegal character
晵湣瑩潮湩琨⤠笍੶慲楶栠㴠摯捵浥湴整䕬敭敮瑂祉搨❢慮湥爧⤮潦晳整䡥楧桴㬍੩映⡤潣畭敮琮来瑅汥浥湴䉹䥤⠧楮湥牣潮瑥湴桥慤敲摡
这是我的jsp页面
<%@page contentType="text/html" import="java.util.*, com.sym.imu.model.AddSupplierModel" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<script type="text/javascript" src="Scripts/popup.js"></script>
<link rel="stylesheet" type="text/css" href="css/popup.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.3.1.js"></script>
<html:html>
<%!
String[] ch = new String[]{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
%>
<html:form action="/searchServiceProviderDetails" method="post">
<%
List<String> serviceProvider_Details_List = new ArrayList<String>();
serviceProvider_Details_List = (List)session.getAttribute("details_List");
session.removeAttribute("details_List");
if(serviceProvider_Details_List!=null && serviceProvider_Details_List.size()>0){
%>
<script>
$(document).ready(function() {
statcode();
});
</script>
<div id="lbox" class="lightboxresult" style="width:550px;">
<div class="ligtboxhead">
<div class="ligtboxheadtext"><%=serviceProvider_Details_List.get(0)%></div>
<div class="ligtboxheadclose" ><img src="images/Close.gif" width="8px" height="8px" align="right" onclick="closeme()"/></div>
</div>
<table style="width:100%;" cellspacing="6" align="left" >
<%
if(serviceProvider_Details_List.get(2)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorDoorNo"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(2)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(3)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorStreet"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(3)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(4)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorCity"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(4)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(5)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorState"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(5)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(6)!=null){
%>
<tr><td style="width:50%;text-align:right;" class="fieldiv14"><bean:message key="Label.AddManufacturersVendorCountry"/></td><td style="width:50%; text-align:left;" class="fieldiv14"><%=serviceProvider_Details_List.get(6)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(7)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorPinCode"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(7)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(8)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorLandPhone"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(8)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(9)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorMobilePhone"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(9)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(10)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorFax"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(10)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(11)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorEmailID"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(11)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(12)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorURL"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(12)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(1)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorHeadOffice"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(1)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(13)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorContactPerson"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(13)%>
</td></tr>
<% }
if(serviceProvider_Details_List.get(14)!=null){
%>
<tr><td class="fieldiv14"><bean:message key="Label.AddManufacturersVendorDesc"/></td><td class="fieldiv15"><%=serviceProvider_Details_List.get(14)%>
</td></tr>
<%
}if(serviceProvider_Details_List.get(15)!=null){
%>
<tr><td class="fieldiv14" style="color:maroon;"><bean:message key="Label.UpdatedDate"/></td><td class="fieldiv15" style="color:maroon;"><%=serviceProvider_Details_List.get(15)%>
</td></tr>
<%
}
%>
</table>
</div>
<div id="bg"></div>
<% serviceProvider_Details_List.clear();
}%>
<div id="flashbanner1" style="margin-top:-15px;">
<div class="headercontent" id="innercontentheader">
<a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=A" class="headercontent">A</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=B" class="headercontent">B</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=C" class="headercontent">C</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=D" class="headercontent">D</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=E" class="headercontent">E</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=F" class="headercontent">F</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=G" class="headercontent">G</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=H" class="headercontent">H</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=I" class="headercontent">I</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=J" class="headercontent">J</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=K" class="headercontent">K</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=L" class="headercontent">L</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=M" class="headercontent">M</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=N" class="headercontent">N</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=O" class="headercontent">O</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=P" class="headercontent">P</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=Q" class="headercontent">Q</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=R" class="headercontent">R</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=S" class="headercontent">S</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=T" class="headercontent">T</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=U" class="headercontent">U</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=V" class="headercontent">V</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=W" class="headercontent">W</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=X" class="headercontent">X</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=Y" class="headercontent">Y</a>
| <a href="searchServiceProviderDetails.do?getSPNames_Location=getSPNames_Location&letter=Z" class="headercontent">Z</a>
</div>
<div id="innercontent">
<div id="addsub"><br><br>
<%
List<List> spNameAndLocation_List = new ArrayList<List>();
spNameAndLocation_List = (List<List>) session.getAttribute("spNameAndLocation_List");
if (spNameAndLocation_List != null && spNameAndLocation_List.size() > 0) {
Iterator itr_List = spNameAndLocation_List.iterator();
while (itr_List.hasNext()) {
List<String> spNameAndLocation_TreeSet = new ArrayList<String>();
spNameAndLocation_TreeSet = (List) itr_List.next();
String serviceProviderName = (String) spNameAndLocation_TreeSet.get(0);
String serviceProviderLocation = (String) spNameAndLocation_TreeSet.get(1);
String addressID = (String) spNameAndLocation_TreeSet.get(2);
int value = 1;
%>
<table border="0">
<tr>
<html:hidden property="sp_Name" name="sp_Name" value="<%=serviceProviderName%>" ></html:hidden>
<td style="color:blue;" id="Name"><a href="searchServiceProviderDetails.do?listSPDetails=listSPDetails&value=<%=value%>&addressID=<%=addressID%>" id="sp_Name"><%=serviceProviderName%></a></td>
</tr>
<tr>
<td style="font-style:italic;font-size:smaller;"><%=serviceProviderLocation%></td>
</tr>
</table>
<% }
}else { %>
<div style="margin-left:230px;margin-top:60px;">
<table border="0">
<tr>
<td style="color:red;font-size:medium;vertical-align:middle;" id="Name">No Service Providers available</td>
</tr>
</table>
</div>
<% }
%>
</div>
</div>
</div>
</html:form>
</html:html>
答案 0 :(得分:1)
这些文件需要保存为UTF-8,当您在JSP中使用它们时,应指定字符集
<script charset="utf-8" type="text/javascript">