开发者

How do I determine if a page is a MODAL

Is there any way in JavaScript I can see if the page I am loading is a modal?

I know I can see if it's in iframe by doing something like this:

var isInIFrame = window.location != window.parent.location ? true : false;

But I wanted to know if there was code to see if it开发者_StackOverflow was a modal window.


You can check for window.dialogArguments.

if (window.dialogArguments) {
  // modal window
}

Edit: That also applies to showModelessDialog, but if you don't use that function, then this works.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜