怎么获得下面广告的所有连接地址?答对者另加分!!!

APP开发王 2007-07-02 12:49:43
<script>
var tixa_bad_mm_flag=true; <!-- BHVAD flag -->
var tixa_bad_mm_pos=0; <!-- BHVAD pos -->
var tixa_bad_mm_style='style_1-2'; <!-- BHVAD style -->
var tixa_bad_mm_info=0; <!-- BHVAD info -->
var tixa_dmad_flag=true; <!-- DMAD flag -->
var tixa_wadRowCount=1; <!--the row count of widead-->
var tixa_wadColumnCount=3; <!--the column count of widead-->
var tixa_wadHeight=85; <!--total height of widead-->
var tixa_wadWidth=525; <!--total width of widead-->
var tixa_wadBorderColor='000000'; <!--the color of the widead's border-->
var tixa_wadBgColor='FFFFFF'; <!--the color of the widead's background-->
var tixa_wadTitleColor='0000ff'; <!--the color of the ad's title-->
var tixa_wadDescColor='034500'; <!--the color of the ad's description-->
var tixa_adType='text'; <!--widead type-->
</script>
<script src='http://union.narrowad.com/proxy/widead.jsp?wid=27241&cid=59734'></script>



上面的代码是嵌入网页的广告代码,当浏览所在的页面广告代码自然出现很多广告的超连接,我如何通过程序获得这些超连接地址?


...全文
357 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
congjl2002 2008-07-15
  • 打赏
  • 举报
回复
我似乎知道你想干什么了,我也想这么做,但是和你有同样的问题。
暂时遇到的困难是无法取到iframe中的内容,因为域不同,禁止访问,所以无法得到iframe中的对象
关注中,期待高手
APP开发王 2007-07-11
  • 打赏
  • 举报
回复
继续等待高人指点。。。。。。。。。。。。
rjzou2006 2007-07-04
  • 打赏
  • 举报
回复
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>

<body onclick="document.all.showmsg.innerText =document.body.parentElement.outerHTML;">
<script>
var tixa_bad_mm_flag=true; <!-- BHVAD flag -->
var tixa_bad_mm_pos=0; <!-- BHVAD pos -->
var tixa_bad_mm_style='style_1-2'; <!-- BHVAD style -->
var tixa_bad_mm_info=0; <!-- BHVAD info -->
var tixa_dmad_flag=true; <!-- DMAD flag -->
var tixa_wadRowCount=1; <!--the row count of widead-->
var tixa_wadColumnCount=3; <!--the column count of widead-->
var tixa_wadHeight=85; <!--total height of widead-->
var tixa_wadWidth=525; <!--total width of widead-->
var tixa_wadBorderColor='000000'; <!--the color of the widead's border-->
var tixa_wadBgColor='FFFFFF'; <!--the color of the widead's background-->
var tixa_wadTitleColor='0000ff'; <!--the color of the ad's title-->
var tixa_wadDescColor='034500'; <!--the color of the ad's description-->
var tixa_adType='text'; <!--widead type-->
</script>
<script src='http://union.narrowad.com/proxy/widead.jsp?wid=27241&cid=59734'></script>
</body>
</html>
<div id="showmsg" style="display:none"></div>


<script language="JavaScript">
<!--
var str="";
function show_src()
{
for (var i = 0;o = document.getElementsByTagName("img"), i < o.length ; i ++)
if(o[i].src != "")str += o[i].src;
for (var j = 0;o1 = document.getElementsByTagName("SCRIPT"), j < o1.length ; j ++)
if(o1[j].src != "")str += o1[j].src;
for (var k = 0;o2 = document.getElementsByTagName("IFRAME"), k < o2.length ; k ++)
if(o2[k].src != "")str += o2[k].src;


alert(str+"\r\n");
}

//-->
</script>

<button onclick="show_src();">查看</button>
APP开发王 2007-07-04
  • 打赏
  • 举报
回复
上面的方法不行,我已测试了!
我要的是广告的超连接!!!!!!!
deninghe 2007-07-03
  • 打赏
  • 举报
回复
这个。。。基本。。上。。。很难~!
通过script又通过iframe到你的当前页
而且链接的地址都绑到了函数里。。。
deninghe 2007-07-03
  • 打赏
  • 举报
回复
别想了 iframe是引用的另一个域的
0-0是否也可以给我分
APP开发王 2007-07-03
  • 打赏
  • 举报
回复
谁能搞定这个问题 ?
APP开发王 2007-07-03
  • 打赏
  • 举报
回复
高手都在哪里啊?
freedor 2007-07-02
  • 打赏
  • 举报
回复
<script type="text/javascript">
function show_src() {
for (var i = 0, o = document.getElementsByTagName("img"), i < o.length ; i ++) alert(o[i].src);
}
</script>

<button onclick="show_src()">查看</button>
APP开发王 2007-07-02
  • 打赏
  • 举报
回复
RUN_(直立行走) ( ) 信誉:100 Blog 加为好友 2007-07-02 13:03:41 得分: 0


用正则表达式啊。获取相应的src


------------------------------------------
没那么简单,不然我给100分做什么?

现在我正式宣布
能解决我的问题的我给300分!!

现在我正式宣布
能解决我的问题的我给300分!!

现在我正式宣布
能解决我的问题的我给300分!!


yangsongshuang 2007-07-02
  • 打赏
  • 举报
回复
一楼说的对
就是用正则表达式获取的!
我做过类似的
zhouqixiang 2007-07-02
  • 打赏
  • 举报
回复
学习
RUN_ 2007-07-02
  • 打赏
  • 举报
回复
用正则表达式啊。获取相应的src

87,909

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧