打印Span的Html效果 - HtmlSpanPrint
2017-05-20 10:48:35 访问(1643) 赞(0) 踩(0)
/// <summary>
/// 打印Span的Html效果 - HtmlSpanPrint
/// </summary>
/// <param name="url"></param>
/// <param name="strText"></param>
/// <param name="strTitle"></param>
/// <param name="cssClass"></param>
/// <returns></returns>
public string HtmlSpanPrint
(
string strText,
string strTitle,
string cssClass
)
{
StringBuilder theResult = new StringBuilder();
theResult.Append("<span ");
if (strTitle != null && strTitle.Length > 0)
{
theResult.Append(" title=\"" + strTitle.Replace("\"", """) + "\"");
}
if (cssClass != null && cssClass.Length > 0)
{
theResult.Append(" class=\"" + cssClass.Replace("\"", """) + "\"");
}
theResult.Append(">" + strText + "</span>");
return theResult.ToString();
}
标签:
打印Span的Html效果 - HtmlSpanPrint 


上一条:
下一条:
相关评论
发表评论