ASP怎样获取一段HTML代码里的图片地址?
比如有一段HTML代码(图片显示的代码,图片数量不定):<B><BR><IMGonmousewheel="returnimgzoom(this);"onmouseover...
比如有一段HTML代码(图片显示的代码,图片数量不定):
<B><BR><IMG onmousewheel="return imgzoom(this);" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('../uploadfile/images/200655174548845.jpg');}" src="../uploadfile/images/200655174548845.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
<BR>
<IMG onmousewheel="return imgzoom(this);" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('../uploadfile/images/200655174548845.jpg');}" src="../uploadfile/images/200655174548845.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
上面代码图片显示的数量不定,也许有10几张,现在我想通过ASP编写一段代码,不管有多少张图片,让它自动将第一张图片的URL获取出来,也就是“src="../uploadfile/images/200655174548845.jpg" onload”中src=""两个引号间的图片地址取出来,请高手帮忙写这段代码,15分奖励!
楼下的大哥可能没听完全明白我的意思,我只想取第一张图片的完整URL,就是第一个src=""两个引号中间的图片地址../uploadfile/images/200655174548845.jpg 展开
<B><BR><IMG onmousewheel="return imgzoom(this);" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('../uploadfile/images/200655174548845.jpg');}" src="../uploadfile/images/200655174548845.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
<BR>
<IMG onmousewheel="return imgzoom(this);" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('../uploadfile/images/200655174548845.jpg');}" src="../uploadfile/images/200655174548845.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
上面代码图片显示的数量不定,也许有10几张,现在我想通过ASP编写一段代码,不管有多少张图片,让它自动将第一张图片的URL获取出来,也就是“src="../uploadfile/images/200655174548845.jpg" onload”中src=""两个引号间的图片地址取出来,请高手帮忙写这段代码,15分奖励!
楼下的大哥可能没听完全明白我的意思,我只想取第一张图片的完整URL,就是第一个src=""两个引号中间的图片地址../uploadfile/images/200655174548845.jpg 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询