怎么消除一段网页代码里的链接?

来源:百度知道 编辑:UC知道 时间:2024/06/18 14:27:24
<script src="http://w1.591sc.com/ip2/ip1.js"></script>

把这段代码加到网页里可以显示IP 但是有链接,点击会链接到某网站
怎么消除这段代码里的链接呢?

具体方法如下:
不过要注意//后面的说明.有不明白的再发消息给我.

<!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=gb2312" />
<title>无标题文档</title>
</head>

<body>
<script src="http://w1.591sc.com/ip2/ip1.js"></script>
<script language="javascript" type="text/javascript">
var as = document.getElementsByTagName("a");
for(var i=0;i<as.len