我可以使用哪些JavaScript的code在新窗口中打开,而不是窗口,我previously开业 [英] What JavaScript code can I use to open in a new window, and not the window I previously opened

查看:109
本文介绍了我可以使用哪些JavaScript的code在新窗口中打开,而不是窗口,我previously开业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的JavaScript。下面是该方案;我有一个变化,每10秒,当我点击它会打开一个链接在新窗口中,当图像变化和我的新形象上点击,它的链接取代了相同的子窗口的链接的ImageButton的。不过,我希望它在一个完全新窗口中打开链接。我怎样才能做到这一点吗? (在code背后谢谢preferably)

这是我目前使用JavaScript code:

  Page.ClientScript.RegisterStartupScript(this.GetType(),开放,window.open(+网站+,open_window','mywindow的','宽= 300,高度= 300,0,状态= 1');,真正的);


解决方案

如果您指定_blank作为窗口的名字,一个新的窗口总是会被打开。

I am new to JavaScript. Here is the scenario; I have an imagebutton that changes every 10 seconds and when I click it opens a link in a new window and when the image changes and I click on the new image, its link replaces the link in the same child window. However I want it to open the link in a completely new window. How can I make that possible please? (Preferably in the code behind Thank You)

This is the JavaScript code I am currently using:

Page.ClientScript.RegisterStartupScript(this.GetType(), "open", " window.open(" + site + ",'open_window','myWindow','width=300,height=300,0,status=1,');", true);

解决方案

If you specify "_blank" as a window's name, a new window will always be opened.

这篇关于我可以使用哪些JavaScript的code在新窗口中打开,而不是窗口,我previously开业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆