问题描述:

<!-- Begin of mycountdown.org script -->

<div align="center" style="margin: 15px 0px 0px 0px">

<noscript>

<div align="center" style="width: 140px; border: 1px solid #ccc; background: #000000; color: #F9F9FF; font-weight: bold; font-size: 12px;">

<a style="text-decoration: none; color: #F9F9FF;" href="http://mycountdown.org/My_Countdown/My_Countdown/">My Countdown</a>

</div>

</noscript>

<script type="text/javascript" src="http://mycountdown.org/countdown.php?cp3_Hex=0F0200&cp2_Hex=000000&cp1_Hex=F9F9FF&ham=0&img=&hbg=0&hfg=0&sid=0&fwdt=150&lab=1&ocd=My+Countdown&text1=SONY 50 inch LCD TV&text2=EXPIRES&group=My Countdown&countdown=My Countdown&widget_number=3010&event_time=1357776000&timezone=America/New_York"></script>

</div>

<!-- End of mycountdown.org script -->

It's a countdown clock but when you click on it, it links to a website, which I don't want.

网友答案:

The <a> is inside a <noscript> tag. If you have JavaScript enabled (most people do), this code is ignored. Thus, removing the anchor will have no effect.

The actual click functionality is being generated by the JavaScript below the <noscript> tag. This is loaded from an external source (http://mycountdown.org/countdown.php...).

If you go directly to that URL, you will see a variety of markup being injected into the page. That's where the clickable regions(s) are coming from. Since it is loading a Flash movie, I doubt you can alter the behavior, i.e. the click events are handled within the movie.

网友答案:

The on click behavior is defined within the Flash object. Thus you need the original Action Script file to remove the link and re-compile it to an SWF object. If you don't own the code, you can't do so. (Well actually you could reverse engineer the whole thing.)

Another option might be to search for some parameter in the documentation to http://mycountdown.org/ (if there is any), which allows to pass in an URL. There you could use # as URL to not link another page. Or maybe there is a parameter that could be used to disable the on click behavior.

Or you could try to use JavaScript to disable the event, but I doubt, that this would play together with Flash.

A working solution is to position another layer (i.e. some DIV) above the counter. Doing so, a click will not be recognized by the Flash animation. This does disable the click, but from my point of view, is a dirty hack.

网友答案:

Why not simply remove the link ?

<a style="text-decoration: none; color:#F9F9FF;" href="http://mycountdown.org/My_Countdown/My_Countdown/">My Countdown</a>

or convert it

<a style="text-decoration: none; color:#F9F9FF;" href="#">My Countdown</a>
网友答案:

You can´t the click event is handle by flash object, you need the code and remove the link in flash.

相关阅读:
Top