In my webapp I work with new Tabs I open with wi开发者_Python百科ndow.open. Sometimes, a tab with the target-name is already open in the background and the window.open(..., "sametarget") only reloads it, which is fine - but the Tab stays in the background after reloading, which is not. Is there any way (JavaScript? window.open parameter?) to get it to the foreground after reloading? Or is this prohibited by browser security? I am trying this in IE7 / IE8.
Does window.focus()
solve your problem?
EDIT
Possibly not: Possible to set tab focus in IE7 from JavaScript
精彩评论