ASP中 replace函数替换问题,请大家帮忙啊 100
Replace(rs("IF_content"),"><img","rel="nofollow"><img")本意是用这个字符串rel="nofollow"><img替换...
Replace(rs("IF_content"),"><img"," rel="nofollow"><img")
本意是用这个字符串 rel="nofollow"><img 替换掉: ><img 但是不执行,提示出错,如图所示
我写的完整程序代码如下所示:
<%
Dim rs,sql,text
Set rs=Server.CreateObject("ADODB.Recordset")
sql="Select IF_content From OT_info"
rs.Open sql,conn,1,3
Do While Not rs.Eof
text=Replace(rs("IF_content"),"><img"," rel="nofollow"><img")
rs("IF_content")=text
rs.Update
rs.MoveNext
Loop
rs.Close
Set rs=Nothing
%>
请高手解答一下啊 展开
本意是用这个字符串 rel="nofollow"><img 替换掉: ><img 但是不执行,提示出错,如图所示
我写的完整程序代码如下所示:
<%
Dim rs,sql,text
Set rs=Server.CreateObject("ADODB.Recordset")
sql="Select IF_content From OT_info"
rs.Open sql,conn,1,3
Do While Not rs.Eof
text=Replace(rs("IF_content"),"><img"," rel="nofollow"><img")
rs("IF_content")=text
rs.Update
rs.MoveNext
Loop
rs.Close
Set rs=Nothing
%>
请高手解答一下啊 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询