我目前正在学习SQL.在我的CFM页面上,我已经从教授给我们的指示中输入了所有信息.我甚至与其他学生相比,试图找出问题所在,但他们的页面看起来像我的.请帮我弄清楚我做错了什么.谢谢.
这是网页链接http://pretendcompany.com/jaedenemployees.html
错误:
第66行第32栏的72777A不是有效的标识符名称.CFML编译器正在处理:CFOUTPUT标记的主体,从第62行第3列开始.
码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="YOUR NAME HERE" />
<title>USU MIS 2100</title>
<style type="text/css" media="all">
td {
align:center;
width:955;
border:none;
text-align:center;
vertical-align:top;
height:40px;
}
table.center{
margin:auto;
}
h1{
font-size:26px;
color:#001F3E;
}
h2{
font-size:20px;
color:#ffffff;
}
img{ text-align:center;
}
td.photo{
margin:auto;
}
</style>
</head>
<body>
<table class="center">
<tr>
<td ><img src="images/header2_usu.jpg" width="755" height="265" alt="usu" /></td>
</tr>
<tr>
<td style="height:900;background-color:#D7D9D9;padding-top:50px;">
Employees by Department at Pretend Company, Inc.</font></p>
<h1>Jaeden Harris</h1>
<CFQUERY name="jaeden" datasource="employeedatasource">
select Accounting,Administrative,Advertising,Payroll,Sales
from employees
where DepartmentName in(#PreserveSingleQuotes(form.SelectDepts)#)
</CFQUERY>
<!--Place opening CFOUTPUT here -->
<CFOUTPUT query="jaeden">
<table style="width:500;border:none;" class="center">
<tr style="background-color:#72777A;">
<td colspan="2"><h2> #DepartmentName# Employees </h2></td>
</tr>
<tr>
<td style="width:250;text-align:left;">Employee:#FirstName# #MiddleName# #LastName#
<p>Title: #Title#
<p>Email: #EmailName# @pretendcompany.com
<p>Contact Number: #WorkPhone#
</p>
</td>
<td style="width:140px;vertical-align:middle;" class="photo"><!--Reference Photograph field here --> </td>
</tr>
</table>
</CFOUTPUT>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
你在CFOUTPUT中,因此对#符号进行评估,包括样式background-color:#72777A;.要么逃避那些带有双重哈希的东西:background-color:##72777A;要么将样式移出你的CFOUTPUT.
由于您已经有了CSS的部分,因此将所有表格样式从HTML内联移动到顶部并将类别应用于元素可能是明智之举.
| 归档时间: |
|
| 查看次数: |
68 次 |
| 最近记录: |