易截截图软件、单文件、免安装、纯绿色、仅160KB

简单的保证原样输出html的c#代码

 public string NoExcuteHtml(string Htmlstring)
    {
        string x = string.Empty;
        x = Htmlstring.Replace(@"&", "&");//将&设置为保留字
        x = x.Replace(@"<", "&lt;"); 
        x = x.Replace(@">", "&gt;");
        x = x.Replace(@" ", "&nbsp;");
        x = x.Replace("\r\n", "<br/>");
        return x;
    }


相关文档:

最全的HTML特殊字符列表


'  &#160; &nbsp; Nonbreaking space
¡ &#161; &iexcl; Inverted exclamation
¢ &#162; &cent; Cent sign
£ &#163; &pound; Pound sterling
¤ &#164; &curren; General currency sign
¥ &#165; &yen; Yen sign
¦ &#1 ......

HTML表格在IE中值为空时不显示表格边框的解决方法

<table border="1" style="empty-cells:show; border-collapse:collapse;"> 
    <tr><td>111</td><td></td> 
    <tr><td></td><td>2222</td> 
<table> 
attention: 
style="empty ......

Html 文字滚动

滚动字幕会让很多人感到兴奋,特别是第一次使用滚动字幕时,会爱不释手。现在做一个详细的方案,让你更全面地了解一下。
  滚动字幕在FrontPage的组件里有,但是FrontPage这个软件只能支持单行文字,一出现多行文字它就无能为力了,而且它只能支持一行滚动!(如果出现只能滚动一行的情况,解决办法是把这段代码嵌入到Java ......

正则表达式获取HTML标记中的内容(C#)


正则表达式获取HTML标记中的内容(C#)
//=====================Begin1========================
            //试验字符串
            string strTmp = string.Empty;
    &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号