JS或者ASP替换特定自定义标签内的neirong

来源:百度知道 编辑:UC知道 时间:2024/05/13 09:41:40
大家多知道HTML支持自定义标签
我想请问下比如我定义个自定义标签<feedit>这里面随便什么内容</feedit>
我想用ASP的替换函数替换到<feedit></feedit>里的内容换成别的什么请问大家可以吗 问题补充 2009-07-31 13:04
比如我的网站源码是这样

<feeditable>

<div><img src="...jpg"></div>

</feeditable>

<body>

<feeditable>

中国人最强大!

</feeditable>

<div>

<feeditable>

中国人

</feeditable>

</div>

</body>

把这里面的所有<feeditable></feeditbale>之间的内容全部替换成我想要的比如全是“中国”也行

如果是高手帮忙看看能不能替换这样的全文性质的部是一个

<feeditable width="100px">这里面带了属性</feeditable>

<feeditable width="100px" height="200px">这里面带了属性</feeditable>

这样的话还能做到替换标签对里的内容吗?

content="fgsf<feeditable width=100px><div><img src=...jpg></div></feeditable>5555555555555"
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.Pattern="(<feeditable.*</feeditable>)"
Set Matches = re.Execute(content)
set re=Nothing
For Each Match in Matches
content=Replace(content,Match.Value,"")
Next
response.Write(content)