小编Meh*_*Man的帖子

将字符串转换为html(超链接)

我为字符串类定义了ToHtml()扩展并将break转换为<br/>.如何检测超链接并转换为<a>元素?

public static class StringExtension
{
    public static string ToHtml(this string item)
    {
        //\r\n windows
        //\n unix
        //\r mac os
        return item.Replace("\r\n", "<br/>").Replace("\n", "<br/>").Replace("\r", "<br/>");
    }
}
Run Code Online (Sandbox Code Playgroud)

c#,asp.net

c#

3
推荐指数
1
解决办法
8569
查看次数

IE7错误与show(0).delay(3000).hide(0)

请给我下面的脚本跨浏览器解决方案:

 $("#action-notify").show(0).delay(3000).hide(0);
Run Code Online (Sandbox Code Playgroud)

它在IE7中有错误(show()方法中的0问题).没有0不是演出后的工作延迟.

编辑:脚本已修改.请为该脚本建议解决方案;

javascript jquery internet-explorer cross-browser

1
推荐指数
1
解决办法
408
查看次数