Use regular expressions to implement pattern Picture News (enhanced). Asp

Source: Internet
Author: User
Customer requirements to save the original IMG already in the attribute, depressed, continue to change
The code is as follows:
function Shownew (content,ntype)
Shownew = ""
if (ntype = 1) Then
Shownew = shownew & "<table width=100% >"
Shownew = shownew & "<TR>"
Shownew = shownew & "<td width=700 align=center style= ' word-break:break-all ' valign=top>" &ShowPic ( Content) & "</TD>"
Shownew = shownew & "</TR>"
Shownew = shownew & "<TR>"
Shownew = shownew & "<td valign=top style= ' Word-break:break-all ' >" &onlyword (Content) & "</TD>"
Shownew = shownew & "</TR>"
Shownew = shownew & "</TABLE>"
ElseIf (ntype = 2) Then
Shownew = shownew & "<table width= ' 100% ' >"
Shownew = shownew & "<TR>"
Shownew = shownew & "<td style= ' Word-break:break-all ' valign=top>" &onlyword (content) & "</TD>"
Shownew = shownew & "</TR>"
Shownew = shownew & "<TR>"
Shownew = shownew & "<td align=center width=700 valign=top style= ' Word-break:break-all ' >" &ShowPic ( Content) & "</TD>"
Shownew = shownew & "</TR>"
Shownew = shownew & "</TABLE>"
ElseIf (ntype = 3) Then
Shownew = shownew & "<TABLE>"
Shownew = shownew & "<TR>"
Shownew = shownew & "<td width=100 align=center valign=top>" &showpic (content) & "</TD>"
Shownew = shownew & "<td width=80% style= ' word-break:break-all ' valign=top>" &onlyword (content) & " </TD> "
Shownew = shownew & "</TR>"
Shownew = shownew & "</TABLE>"
ElseIf (ntype = 4) Then

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.