日期:2014-05-16 浏览次数:20571 次
var s='<a href=\'javascript:ShowProductDetail("<%# Eval("ProductGuid")%>")\'><%# Eval("ProductName")%></a>'; alert(s.replace(/<\/?a[^>]*>/gi,''));
------解决方案--------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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>
这样??