开发者

opening a link in <body onload=""

I guess this is possible, but I don't know how.

<a rel="width[640];height[480];autostart[true];loop[true];title[Google]" class="jcepopup" href="http://www.google.nl">Aanbieding</a>

Can i开发者_Go百科t be done linke this?

<body onload="javascript: laden()">


<script type="text/javascript">

  function laden()

  {

  window.open('http://www.google.nl rel="width[640];height[480];autostart[true];loop[true];title[Google]" class="jcepopup"', 'blablabla', 'width=720', 'heigt=500');

  }


Most browsers these days block pop-ups because of this very use. There are a couple of generally accepted ways to get around this (I hope lightning does not strike me down).

  1. Open the pop-up after the user clicks on something
  2. Embed some Flash and use ActionScript to open it

The Flash method is renowned enough that you can find several links about it online. If you can shove some Javascript into some container, you can essentially bypass the restrictions (if you get creative). Windows Media files, for instance. Movies are great for opening pop-ups.

I'm going to leave this intentionally vague, as I don't want to be responsible for the proliferation of more pop-ups.


Yes, but you don't need the javascript: in your onload, you can just do:

<body onload="laden();">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜