简体   繁体   中英

simulate click on a specific place in page

I have a little problem with simulating a click with javascript.

I'm aware of the .click() method but the click must be on a prezi loaded (flash) so don't really have a html element to use.

What I have instead are the exactly coordinates of the place I want to simulate click on. Is there any way I can do that?

The click must activate a flash element. (A play button)

Note: There is a similar question around that have an answer witch require swf control. I don't have that so that method is not applicable.

One other quick question... what happens if I simulate a click on an element that has display: none. It click on the elements "under" it? (as a normal click would do; and yes I know this sounds funny but I don't know how to explain it otherwise). If yes I was thinking of making a position absolute div, put it on top of flash and use .click(). The problem is that i have a feeling that the click won't be applied on flash.

This is somehow a combination of javascript simulate mouse click on specific position and mouse click somewhere else on page (not on a specific div) .

Make a transparent gif and position it absolute in your page wherever you need, then simulate a click on it.

I use this technique on some flash ads because I don't want to open links using JavaScript (since some users can be prompted with a question if they wan't or not to open a new page on click).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM