Need some editing (onload event) popup window
I want to put <BODY onLoad="alert('flowers')">
in my page and I want it to repeat for 3 times and I want it pop in coordination x开发者_如何学运维,y (453,234) because there is a scary picture just under it so I want to just test how it will affect people.
You can repeat it 3 times by just calling the alert method 3 times, but you don't have control over the position of an alert dialog. If you want the dialog to cover a particular area of the screen, you will need to create a custom dialog (using a <div>
).
You could also try to change the position of the scary picture such that it is behind the alert dialog. (The dialog will be at the center of the browser window, although I don't know if you can rely on that.)
call alert 3 time like this:
onload="alert('flowers 1'); alert('flowers 2'); alert('flowers 3')"
as vincent said, to position the alert you would have to make a custom alert, which is much more work. You could take a look Here.
精彩评论