如:<a href='javascript:ShowProductDetail("<%# Eval("ProductGuid")%>")'><%# Eval("ProductName")%></a>
我现在想通过js去掉<a href='javascript:ShowProductDetail("<%# Eval("ProductGuid")%>")'>
保留<%# Eval("ProductName")%> 请问各位大虾,如何实现?
我现在想通过js去掉<a href='javascript:ShowProductDetail("<%# Eval("ProductGuid")%>")'>
保留<%# Eval("ProductName")%> 请问各位大虾,如何实现?
alert(s.replace(/<\/?a[^>]*>/gi,''));
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
function init(){
var a=document.links;
for(var i=0;i<a.length;i++){
var par=a[i].parentNode;
var p=document.createElement("font");
p.innerHTML=a[i].innerHTML;
par.replaceChild(p,a[i]);
}
}
window.onload=init;
</script>
</head><body>
<a href='javascript:ShowProductDetail("<%# Eval("ProductGuid")%>")'><%# Eval("ProductName")%></a>
</body>
</html>
这样??