我想通过拼写html语句来在显示一个浮层出来。浮层显示是通过js控制的,
protected string getDivHtml(string JobID)
{ string s;
DataTable dt = dalIntership.GetIntershipInfobyJobid(JobID);
s = "<table id=" + "DivTipShowDuty" + "width=" + "100%" + "border=" + "1px" + "bordercolor=" + "#FF0000" + ">";
s += "<tr><td bgcolor=" + "#F1F1F1" + "><b>工作职责:</b></td><td width=" + "200" + " style=" + "background-color:#ffffff;table-layout:fixed;height:30" + ">" + dt.Rows[0]["Duty"] + "</td></tr>";
s += "<tr><td height=" + "1" + "></td></tr>";
s += "<tr><td bgcolor=" + "#F1F1F1" + "><b>实习资格:</b></td><td width=" + "200" + " style=" + "background-color:#ffffff;table-layout:fixed;" + ">" + dt.Rows[0]["JobRequest"] + "</td></tr>";
s += "</table>";
return s;
}不知道这里面为什么不能有'这字符出现???
protected string getDivHtml(string JobID)
{ string s;
DataTable dt = dalIntership.GetIntershipInfobyJobid(JobID);
s = "<table id=" + "DivTipShowDuty" + "width=" + "100%" + "border=" + "1px" + "bordercolor=" + "#FF0000" + ">";
s += "<tr><td bgcolor=" + "#F1F1F1" + "><b>工作职责:</b></td><td width=" + "200" + " style=" + "background-color:#ffffff;table-layout:fixed;height:30" + ">" + dt.Rows[0]["Duty"] + "</td></tr>";
s += "<tr><td height=" + "1" + "></td></tr>";
s += "<tr><td bgcolor=" + "#F1F1F1" + "><b>实习资格:</b></td><td width=" + "200" + " style=" + "background-color:#ffffff;table-layout:fixed;" + ">" + dt.Rows[0]["JobRequest"] + "</td></tr>";
s += "</table>";
return s;
}不知道这里面为什么不能有'这字符出现???
s = "<table id='DivTipShowDuty' width='100%' border='1px' bordercolor='#FF0000'>";
<tr><td bgcolor=#F1F1F1><b>工作职责:</b></td><td width=200 style=background-color:#ffffff;table-layout:fixed;height:30>'1'23</td></tr>
<tr><td height=1></td></tr>
<tr><td bgcolor=#F1F1F1><b>实习资格:</b></td><td width=200 style=background-color:#ffffff;table-layout:fixed;>4'56'</td></tr>
</table>
单步跟踪