English 中文(简体)
打开一个窗户,其背景是大火和歌剧中的 j字错误
原标题:open a window in background with javascript error in firefox and opera

i m 想要打开一个带有javascript的档案。 该法典在霍乱、火ox(12)和在地下操作新窗户。

任何人都知道什么是 m错?

这里有两份档案:

父亲:html

<html>
<body>
<script>
    var son=null;
    function openIt(){
        son=window.open( son.html , sonpage ); 
        son.blur(); 
        self.focus(); 
        window.focus(); 
        //alert("voy");
        return false;
    }
</script>
<a href="javascript:void(0)" onClick="openIt(); return false;">Open</a>
<a href="javascript:void(0)" onClick="son.close()">Close</a>
<button type="button" id="play2-video" onclick="son.play()">
    play2 video
</button>
<button type="button" id="pause2-video" onclick="son.pausa()">
    pause video
</button>   
Father Page
</body>

son.html:

<html>
<Head>
    <script>
        function play(){
            alert("Play!");
        }           
        function stop(){
            alert("Stop!");
        }
    </script>
</Head>
<Body>
    <h1> Son Page</h1>
</Body>

谢谢!

问题回答

Firefox will only obey requests to raise a window if a security option is set, and it s not set by default. Chrome won t pay attention to focus() requests at all, as far as I can tell. Safari does obey focus() request.

The specific Firefox setting is in the "Tools -> Options" dialog. There s a "Content" tab, and in that there s a checkbox for enabling Javascript. Along with that is an "Advanced" button that brings up another dialog, wherein one finds a checkbox to allow (or disallow) the raising and lowering of windows by page code.

http://stackoverflow.com/a/2533335/643500”

加入法典的各位——不高兴

该职能仅需要:

function openIt(){
    son=window.open( son.html , sonpage ); 
    window.focus();
    return false;
}

设法从开放网页转至主页,看看能否做到这一点?

另外,在研究JQuery时,委员会可以处理下列事件:





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签