VB.NET 美化HTML代码

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

猜你在找的VB相关文章