摘要: #region 获取主机名称 /// <summary> /// 获取主机名称 返回如 www.baidu.com or www.baidu.com:8080 注意没有 http:// /// </summary> /// <returns></returns> public static string GetHttpHost() { int Port = HttpContext.Current.Request.Url.Port; if (Port == 80) { return HttpContext.Current.Request.Url.H 阅读全文
posted @ 2013-02-05 10:11 沅江 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #region 去掉空格 /// <summary> /// 去掉空格 /// </summary> /// <param name="str"></param> /// <returns></returns> private string testkg(string str) { str = System.Text.RegularExpressions.Regex.Replace(str, @"&nbsp;", "", System.Text.Regul 阅读全文
posted @ 2013-02-05 10:08 沅江 阅读(531) 评论(0) 推荐(0) 编辑
摘要: //基本想要得功能实现了,但在添加的标签顺序还有点问题#region 闭合HTML代码 public string CloseHTML(string str) { string[] HtmlTag = new string[] { "ul", "font", "b", "u", "i", "a", "h1", "h2", "h3", "h4", "h5", "h6&q 阅读全文
posted @ 2013-02-05 10:07 沅江 阅读(423) 评论(0) 推荐(0) 编辑
摘要: //父页面(iframe)function fun() { $('#a').contents().find("#bbb").val("父页面赋值给子页面"); //给子页面指定id赋值}//子页面function fun() { $(window.parent.fun()); //调用父页面函数 $(window.parent.$("#pan").html("子页面赋过来的值")); //设置父页面指定id $(window.parent.$("#hide").hide()); 阅读全文
posted @ 2013-02-05 09:55 沅江 阅读(264) 评论(0) 推荐(0) 编辑