| |

VerySource

 Forgot password?
 Register
Search
View: 753|Reply: 2

Ask for a rule, help ...

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-18 16:00:01
| Show all posts |Read mode
<div id = "middle"> <tr> <tdalign = 'right'> <imgsrc = http: //www.jieju100.com/images/news_img/20071217572866577801.jpgwidth=166height=125border=0> <br/> < imgheight = '16'src =' http: //www.jieju100.com/images/news_img/20071217572866577802.gif'width='16'align='absbottom'/> Click for larger image </ td> </ tr> <tr> <tdalign = 'middle'bgcolor =' # eeeeee '> | More info </ td> </ tr> <P> Window of different sizes,

I want to replace it with "<div id =" middle "> <P> windows of different areas," where the picture name is a variable
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-24 20:09:01
| Show all posts
Use js, document.getById ("middle"). InnerHTML = "What you want";
You will get: <div id = "middle"> "What you want" </ div>
Reply

Use magic Report

0

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-25 14:09:02
| Show all posts
Does the landlord mean between "<div id =" middle ">" and "<P> windows of different area," no matter what the content is, replace it with empty, if so, then "<P> of different area Windows, "are you sure? If so, use the following
yourStr = "...........";
string resultStr = Regex.Replace (yourStr, "(<div id =\" middle\">) ([\\s\\S] *?) (<P> Window of different area,)" "," $ 1 $ 3 ", RegexOptions.IgnoreCase);

If only "<P>" is OK, then use the following
yourStr = "...........";
string resultStr = Regex.Replace (yourStr, "(<div id =\" middle\">) ([\\s\\S] *?) (<P>)", "$ 1 $ 3", RegexOptions.IgnoreCase);
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list