VB.NET 美化HTML代码

来源:互联网 发布:网络借贷平台的特点 编辑:程序博客网 时间:2024/06/05 19:10
    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

0 0
原创粉丝点击