VB.NET 美化HTML代码

前端之家收集整理的这篇文章主要介绍了VB.NET 美化HTML代码前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
    Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click
        Dim web As New Net.WebClient
        Dim content As String
        web.Headers("Content-Type") = "application/x-www-form-urlencoded"
        web.Headers("Referer") = "http://tool.lu/html/"
        content = web.UploadString("http://tool.lu/html/ajax.html","operate=beauty&code=" & Uri.EscapeDataString(RichTextBox1.Text))
        content = Replace(content,"{""status"":true,""message"":"""",""text"":""","")
        content = Replace(content,"""}","")
        content = System.Text.RegularExpressions.Regex.Unescape(content)
        RichTextBox1.Text = content
    End Sub
原文链接:https://www.f2er.com/vb/258100.html

猜你在找的VB相关文章