未声明纯文本文档的字符编码。如果文档包含US-ASCII范围之外的字符,则文档将在某些浏览器配置中使用乱码文本进行渲染。需要在传输协议中声明文件的字符编码,或者文件需要使用字节顺序标记作为编码签名。
第0行
我的JSP如下:
<%
response.addHeader("Pragma","no-store");
response.setHeader("Cache-Control","no-cache,no-store,must-revalidate");
response.setDateHeader("Expires",-1);
%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page import="java.util.Random" %>
<%
int random = 1;
Random r = new Random();
random = r.nextInt();
%>
<html>
<head>
<title>Clinical Communicator/Administration Portal</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<%@ taglib prefix="s" uri="/struts-tags" %>
</head>
<link href="<%=request.getContextPath() %>/css/admin.css" rel="stylesheet" type="text/css">
<link rel='stylesheet' type='text/css' href='css/jquery-ui.css' />
<script type='text/javascript' src='javascript/jquery/jquery-1.5.1.js'></script>
<script type='text/javascript' src='javascript/jquery/jquery-ui.min.js'></script>
<script type="text/javascript" src="javascript/admin.js"></script>
<script>
$(document).ready(function() {
var ref = document.referrer;
<%-- if (ref != null && ref.length > 0 && ref.indexOf("<%=request.getContextPath()%>") > 0){ --%>
//alert("main");
$("#menuTab2").removeClass("headermyprofilesoff").addClass("menuTab2");
/*}
else {
window.location.href="AdminLogout";
} */
});
</script>
<body>
<s:include value="Header.jsp" />
<table border="0" width="100%" id="table1" class="headerbglight">
<tr>
<td width="30%"><font face="Arial">Question Type</font></td>
<td>
<font face="Arial">
<select size="1" name="D1">
<option>One by One</option>
<option>Full Question</option>
</select></font></td>
</tr>
<tr>
<td><font face="Arial">Question option</font></td>
<td>
<select size="1" name="D2">
<option>Single</option>
<option>Multi</option>
</select></td>
</tr>
<tr>
<td><font face="Arial">Question content</font></td>
<td>
<input type="text" name="T1" size="20"></td>
</tr>
<tr>
<td><font face="Arial">Answers</font></td>
<td>
<div id="answers" >
<input type="text" name="T2" size="20" id="answer" class="selector">
</div>
<input type="button" value="+" name="B3" id="btnAnswer" onclick="addAnswers()">
(click on this button will create another field so you can type content
for the other answer, this can be done using jquery)<br>
<input type="checkbox" name="c" value="1">Allow this answer to be free text
</td>
</tr>
<tr>
<td colspan="2">
<input type="button" value="Submit Question">
<input type="button" value="Create Other Question">
</td>
</tr>
<tr>
<td colspan="2" >
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="150" align="center" valign="middle" ><div id="footer"><s:text name="Copyright" /></div></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>