JSPページに次のHTMLがあります。何らかの理由で、<script type="text/javascript">
$("#department").autocomplete("department.jsp",{minChars: 4});
最初input type
に残りのフィールドがInternet Explorer 8に表示されなかった後に追加された場合、FirefoxとChromeでは表示されます。
これの理由は何でしょうか?
<table width="583" border="0">
<tr>
<td>Employee No:</td>
<td> <input type="text" id="employee " name="employee " size="30">
<script type="text/javascript">
$("#department").autocomplete("department.jsp");
</script></td>
</tr>
次のコードはIE8ではレンダリングされません
<tr>
<td>Join Date </td>
<td>
<input type="text" id="jdate" name="jdate" size="30"/></td>
</tr>
<tr>
<td>Contracrt </td>
<td><input type="text" id="cont" name="cont" size="30"/></td>
</tr>
</table>
編集1
完全なHTMLコード
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<html><head>
<link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css" />
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="js/jquery.autocomplete.js" type="text/javascript"></script>
</head>
<body>
<p>
<f:view>
<h:form id="employeefrm">
<table width="583" border="0">
<tr>
<td>Employee No:</td>
<td> <input type="text" id="employee " name="employee " size="30">
<script type="text/javascript">
$("#department").autocomplete("department.jsp");
</script></td>
</tr>
<tr>
<td>Join Date </td>
<td>
<input type="text" id="jdate" name="jdate" size="30"/></td>
</tr>
<tr>
<td>Contracrt </td>
<td><input type="text" id="cont" name="cont" size="30"/></td>
</tr>
</table>
<p> </p>
</h:form>
</f:view>
</body>
</html>
編集2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css" />
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="js/jquery.autocomplete.js" type="text/javascript"></script>
</head>
<body>
<p>
<form id="employeefrm" method="post" action="emp.jsp" enctype="application/x-www-form-urlencoded">
<table width="583" border="1">
<tr>
<td>Employee No:</td>
<td> <input type="text" id="employee " name="employee " size="50">
<script type="text/javascript">
$("#department").autocomplete("department.jsp");
</script></td>
</tr>
<tr>
<td>Join Date </td>
<td>
<input type="text" id="jdate" name="jdate" size="30"/></td>
</tr>
<tr>
<td>Contracrt </td>
<td><input type="text" id="cont" name="cont" size="30"/></td>
</tr>
</table>
<p> </p>
<input type="hidden" name="employeefrm" value="employeefrm" /></form>
</body>
</html>