我在html / js页面中遗漏了什么?代码在JSFIDDLE中运行良好但不在我的桌面!!!!
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>title</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script>
$(document).ready(function () {
$("#addRow").click(function () {
$("#myTable").append("<tr><td>row</td><td><input type='text'></td></tr>");
});
});
</script>
</head>
<body>
<table id="myTable">
<tr>
<td>row</td>
<td>
<input type='text'>
</td>
</tr>
<tr>
<td>row</td>
<td>
<input type='text'>
</td>
</tr>
</table>
<input type="button" id="addRow" value="add" />
</body>
</html>
请问有什么想法吗?提前谢谢。
答案 0 :(得分:1)
ResultSet rs=stm.executeQuery("select * from logincred"); Table 1
ResultSet rs1=stm.executeQuery("select * from home"); Table 2
ResultSetMetaData metadata=rs.getMetaData();
int colCount=metadata.getColumnCount();
System.out.println(colCount);
while(rs.next()){
for(int i=1;i<=colCount;i++){
String result=rs.getString(i);
System.out.println(result + " : ");
listOfLoginCred.add(result);
System.out.println(listOfLoginCred);
}
}
在使用$(document).ready()之前,您是否已将jQuery库加载到您的网页中?