添加div符号注意符号问题

 AspShowMsg.InnerHtml = ShowMsgDiv("hello world");

   public static string ShowMsgDiv(string str)
        {
            StringBuilder Msg = new StringBuilder();
            Msg.Append("<div id=\"ASPalertLayer\" style=\"display:block;\">");
            // Msg.Append("<div id='ASPalertLayer' style='display:block;'>");也可以这样写但符号多的话还是用上面的那种比较好

            Msg.Append(str);
            Msg.Append("<p></p><p><a href=\"javascript:;\" onclick=\"document.getElementById('ASPalertLayer').style.display='none';document.getElementById('iFr').style.display='none';\">[关闭]</a></p></div>");
            return Msg.ToString();
        }
posted @ 2008-06-13 11:46  思然  阅读(509)  评论(0编辑  收藏  举报