标题:js广告点击事件的获取
只看楼主
yqf0808
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2011-1-19
 问题点数:0 回复次数:1 
js广告点击事件的获取
点击js广告后进入页面的js方法,怎样实现呀?
在http://www.这个页面上,第二个和最后一个图片广告是js广告。点击后怎样进入页面内的clickCalc(obj1)方法中?页面中第一个广告不是js广告,点击后能进入这个js方法。代码如下:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.

<html xmlns="http://www.
<head id="Head1"><title>
    发布广告页
</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">
<!--
body {
    background-color: #FFCCFF;
}
-->
<script   languange="javascript">   
document.onclick=myfunc;   
function   myfunc()   
{   
alert(window.event.srcElement.tagName);   
}   
</script>

</style></head>



<script language="javascript" type="text/javascript">

function clickCalc(obj1){

    window.location.href="addRecord.aspx?guangGaoId=" + obj1;
}
</script>

<body>
    <form name="form1" method="post" action="guangGao.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTI4MjI0NzAxNGRk+GBKKUjJtRgUUdx110rRw2gR0uI=" />
</div>

        <div>124.64.214.51
            <br />
            <br />
               
                       <a id="Layer0" onclick="clickCalc(94)" >
                        <a href="http://count. target="_blank"><IMG SRC="http://file. width="728" height="90" border="0"></a>
                        </a><br /><br /><br /><br /><br /><br /><br />
                           
                    
               
                       <a id="Layer1" onclick="clickCalc(104)" >
                        <script type="text/javascript">/*728*90,创建于2011-1-19*/ var cpro_id = 'u356485';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
                        </a><br /><br /><br /><br /><br /><br /><br />
                           
                    
               
                       <a id="Layer2" onclick="clickCalc(113)" >
                        <script type="text/javascript">/*640*60,创建于2011-1-19*/ var cpro_id = 'u356545';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
                        </a><br /><br /><br /><br /><br /><br /><br />
                           
                    
               
                       <a id="Layer3" onclick="clickCalc(106)" >
                        <a href="http://count. target="_blank"><IMG SRC="http://file. width="468" height="60"  border="0"></a>
                        </a><br /><br /><br /><br /><br /><br /><br />
                           
                    
               
                       <a id="Layer4" onclick="clickCalc(112)" >
                        <script type="text/javascript">
     u_a_client="2073";
     u_a_width="468";
     u_a_height="60";
     u_a_zones="15398";
     u_a_type="0"
    </script>
    <script src="http://www.
                        </a><br /><br /><br /><br /><br /><br /><br />
                           
                    
               
        
            
            
        </div>
    </form>
</body>
</html>
搜索更多相关主题的帖子: PUBLIC 图片广告 
2011-01-19 17:15
cxwl3sxl
Rank: 3Rank: 3
等 级:论坛游侠
威 望:1
帖 子:495
专家分:129
注 册:2005-11-12
得分:0 
给那个图片添加click事件不行么?

努力,哈哈,总有一天会变成高手~~~~~~因为我相信:没有办不到,只有想不到!http://t..cn/fpress
2011-02-26 11:06



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-331315-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.010311 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved